redhat-cop / infra.leapp

Collection of Ansible roles for automating RHEL in-place upgrades using Leapp.
MIT License
46 stars 37 forks source link

Task "Reboot to continue Leapp OS upgrade" - Timeout #92

Closed dfmateus closed 1 year ago

dfmateus commented 1 year ago

In Task, it does not continue, it waits until the timeout, when I open a new terminal the server is active and operational, what could be happening, a problem with the reboot module?

  • name: Reboot to continue Leapp OS upgrade ansible.builtin.reboot: msg: "Host is starting Leapp OS upgrade now!" post_reboot_delay: 60 reboot_timeout: 43200 timeout: 43260
djdanielsson commented 1 year ago

yes that sounds like an issue with the reboot module, if you have Ansible support I would suggest opening a ticket. if not maybe create an issue in the ansible repo

djdanielsson commented 1 year ago

how often do you see this issue?

dfmateus commented 1 year ago

how often do you see this issue?

This behavior started just a few days ago, I tried to switch to using ansible.builtin.command shutdown and then wait for connection with the ansible.builtin.wait_for_connection module but the same behavior happened.

djdanielsson commented 1 year ago

How often are you seeing this issue? Every upgrade? 1 out of 10?

dfmateus commented 1 year ago

How often are you seeing this issue? Every upgrade? 1 out of 10?

It's happening to me every time it gets to the part where it reboots to complete the upgrade in the option RHEL-Upgrade-initramfs

I'm not sure if this is only happening to me. Anyway, I'm going to open a ticket with Red Hat to check if there is any problem with the reboot module.

djdanielsson commented 1 year ago

I have run into this but only like 2% of the time so not sure why it is happening 100% of the time for you. are you running this CLI or on AAP? if CLI are you using navigator or Ansible-playbook? can you give me your ansible-core version or the EE you are using?

dfmateus commented 1 year ago

I'm running this directly from AAP using ansible-automation-platform-23/ee-supported-rhel8

jeffmcutter commented 1 year ago

@dfmateus Can you try using the reboot module and adding vars: ansible_ssh_args: "" as shown below?

      ansible.builtin.reboot:
        ...
      vars:
        ansible_ssh_args: ""

Thanks!

dfmateus commented 1 year ago

@dfmateus Can you try using the reboot module and adding vars: ansible_ssh_args: "" as shown below?

      ansible.builtin.reboot:
        ...
      vars:
        ansible_ssh_args: ""

Thanks!

Hello, I've made the test and the error happened as:

Failed to connect to the host via ssh: PTY allocation request failed on channel 0

jeffmcutter commented 1 year ago

Perhaps you are using other ansible_ssh_args that are needed? I was able to use that option in a lab environment.

Are you continuing to have this issue @dfmateus? What version of Ansible are you using?

dfmateus commented 1 year ago

Hello guys, thanks for all help, but I've found the issue is related to specific user, I've changed the user and works as expected.