Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Whack a VM Swap Playbook: Swapped VM Loses Network Connectivity #5735

Open
kayiwa opened this issue Jan 13, 2025 · 2 comments
Open

Whack a VM Swap Playbook: Swapped VM Loses Network Connectivity #5735

kayiwa opened this issue Jan 13, 2025 · 2 comments
Assignees
Labels

Comments

@kayiwa
Copy link
Member

kayiwa commented Jan 13, 2025

Expected behavior

The playbook designed to swap a virtual machine (VM) successfully completes all tasks without errors. However, after the swap is performed, the new VM is unable to establish network connectivity. This prevents any external communication with the server, making it inaccessible.

Actual behavior

Error messages

Include any error messages from STDOUT, STDERR, log files, etc., that you did not include under 'Actual behavior' above.

Steps to replicate

Prepare Environment:

  1. Have a running VM (VM-A) with a working network connection.
  2. run playbook and wait for replacement VM (VM-A-new) with a working network connection.

Expected Behavior:

The VM swap playbook should result in a fully functional VM (VM-A-new) that has network connectivity. I should be able to connect to the VM via SSH, ping, and other network services as configured.

Actual Behavior:

The playbook reports success, but the swapped VM (VM-B) has no network connectivity. Attempts to connect via SSH, ping, or other protocols fail. The VM is essentially isolated from the network.

Impact of this bug

Ops have to manually log in at the console

and run

sudo dhclient -v

then create this systemd unit file

[Unit]
Description=DHCP Client for %i
After=network.target

[Service]
ExecStart=/sbin/dhclient -v %i
Restart=always

[Install]
WantedBy=multi-user.target

Relevant links and code snippets, if applicable

Implementation notes, if any

@kayiwa kayiwa added the bug label Jan 13, 2025
@kayiwa kayiwa self-assigned this Jan 13, 2025
@kayiwa
Copy link
Member Author

kayiwa commented Jan 14, 2025

the Rocky Template was using RHEL 8 instead of CentOS 8

@kayiwa
Copy link
Member Author

kayiwa commented Jan 14, 2025

we still fail at the same spot requiring manual intervention. Results of journalctl -b | grep -i network specifically show.

Jan 14 11:28:43 nomad-client-prod4 NetworkManager[817]: <warn>  [1736875723.1576] ifcfg-rh: ifcfg,/etc/sysconfig/network-scripts/ifcfg-ens192:11: invalid line ignored
Jan 14 11:28:43 nomad-client-prod4 NetworkManager[817]: <warn>  [1736875723.1576] ifcfg-rh: ifcfg,/etc/sysconfig/network-scripts/ifcfg-ens192:12: invalid line ignored
Jan 14 11:28:43 nomad-client-prod4 NetworkManager[817]: <warn>  [1736875723.1576] ifcfg-rh: ifcfg,/etc/sysconfig/network-scripts/ifcfg-ens192:13: invalid line ignored

It seems like we will need to use keyfiles instead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant