Upgrade to Red Hat Satellite 6.15 fails with: /usr/sbin/foreman-rake db:migrate' returned 1 instead of one of [0]

Solution Verified - Updated

Environment

  • Red Hat Satellite 6.15

Issue

  • Upgrade to Satellite 6.15 fails with:

    /usr/sbin/foreman-rake db:migrate' returned 1 instead of one of [0]
    
    Errno::EAFNOSUPPORT: Address family not supported by protocol - socket(2)
    

Resolution

  • The reported issue has been fixed in the errata RHBA-2024:3799 Red Hat Satellite 6.15.1.

  • From Red Hat Satellite 6.15.1 and above satellite-maintain upgrade check fails with ipv6.disable=1 before upgrading Satellite.

    Check if ipv6.disable=1 is set at kernel level:                       [FAIL]
    The kernel contains ipv6.disable=1 which is known to break installation and upgrade, remove and reboot before continuing.
    
  • Check for the Diagnostic Steps for the actual DEBUG trace for this error. If you receive similar error then the you will need to disable IPV6 properly using How do I disable the IPv6 protocol on Red Hat Satellite and/or Red Hat Capsule server?

For more KB articles/solutions related to Red Hat Satellite 6.x Installation/Upgrade/Update Issues, please refer to the Red Hat Satellite Consolidated Troubleshooting Article for Red Hat Satellite 6.x Installation/Upgrade/Update Issues.

Root Cause

  • IPV6 on satellite was disabled incorrectly. Below kernel options were used:

    set kernelopts="root=/dev/mapper/vgroot-lvroot ro audit_backlog_limit=8192 audit=1 nofb splash=quiet ipv6.disable=1 crashkernel=auto resume=/dev/mapper/vgroot-lvswap01 rd.lvm.lv=vgroot/lvroot rd.lvm.lv=vgroot/lvswap01 rd.lvm.lv=vgroot/lvusr net.ifnames=0 rhgb quiet selinux=1 "
    

Diagnostic Steps

  • /var/log/foreman-installer/satellite.log has:

    2024-04-25 15:57:08 [ERROR ] [configure] '/usr/sbin/foreman-rake db:migrate' returned 1 instead of one of [0]
    2024-04-25 15:57:08 [ERROR ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/returns: change from 'notrun' to ['0'] failed: '/usr/sbin/foreman-rake db:migrate' returned 1 instead of one of [0]
    2024-04-25 15:57:08 [DEBUG ] [configure] Exec[foreman-rake-db:migrate](provider=posix): Executing check '/usr/sbin/foreman-rake db:abort_if_pending_migrations'
    2024-04-25 15:57:08 [DEBUG ] [configure] Executing with uid=foreman: '/usr/sbin/foreman-rake db:abort_if_pending_migrations'
    2024-04-25 15:57:30 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: rake aborted!
    2024-04-25 15:57:30 [DEBUG ] [configure] /Stage[main]/Foreman::Database/Foreman::Rake[db:migrate]/Exec[foreman-rake-db:migrate]/unless: Errno::EAFNOSUPPORT: Address family not supported by protocol - socket(2)
    
  • The important line to note here is in the DEBUG trace which hints towards some issue with IPV6:

    Errno::EAFNOSUPPORT: Address family not supported by protocol - socket(2)
    
SBR
Product(s)
Components
Category

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.