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

Cleanup: Restart network doesn't work on Fedora CoreOS #7262

Closed
guni1192 opened this issue Feb 7, 2021 · 3 comments · Fixed by #7271
Closed

Cleanup: Restart network doesn't work on Fedora CoreOS #7262

guni1192 opened this issue Feb 7, 2021 · 3 comments · Fixed by #7271
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@guni1192
Copy link
Contributor

guni1192 commented Feb 7, 2021

Hi!
I'm trying to clean up a Kubernetes cluster from remove-node.yml.
However, it task stopped in reset | Restart network.
I use Fedora CoreOS for worker and control planes.
I think that the task failed because of not enough conditions.
Fedora CoreOS is essentially using NetworkManager, but this task returns network.

{% if ansible_os_family == "RedHat" -%}
{%- if ansible_distribution_major_version|int == 8 -%}
NetworkManager
{%- else -%}
network
{%- endif -%}

How about changing it like this. It works in my environment.

+ {%- if ansible_distribution_major_version|int == 8 or is_fedora_coreos -%}
- {%- if ansible_distribution_major_version|int == 8 -%}

Environment:

  • Cloud provider or hardware configuration:
    Hyper-V
  • OS (printf "$(uname -srm)\n$(cat /etc/os-release)\n"):
[core@worker1 ~]$ cat /etc/os-release
NAME=Fedora
VERSION="33.20210117.3.2 (CoreOS)"
ID=fedora
VERSION_ID=33
VERSION_CODENAME=""
PLATFORM_ID="platform:f33"
PRETTY_NAME="Fedora CoreOS 33.20210117.3.2"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:33"
HOME_URL="https://getfedora.org/coreos/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora-coreos/"
SUPPORT_URL="https://github.com/coreos/fedora-coreos-tracker/"
BUG_REPORT_URL="https://github.com/coreos/fedora-coreos-tracker/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=33
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=33
PRIVACY_POLICY_URL="https://fedoraproject.org/wiki/Legal:PrivacyPolicy"
VARIANT="CoreOS"
VARIANT_ID=coreos
OSTREE_VERSION='33.20210117.3.2'
  • Version of Ansible (ansible --version):
  • Version of Python (python --version):
root@f4487784a012:/kubespray# ansible --version
ansible 2.9.16
  config file = /kubespray/ansible.cfg
  configured module search path = ['/kubespray/library']
  ansible python module location = /usr/local/lib/python3.6/dist-packages/ansible
  executable location = /usr/local/bin/ansible
  python version = 3.6.9 (default, Oct  8 2020, 12:12:24) [GCC 8.4.0]

Kubespray version (commit) (git rev-parse --short HEAD):
v2.15.0

Network plugin used:
calico-rr

Full inventory with variables (ansible -i inventory/sample/inventory.ini all -m debug -a "var=hostvars[inventory_hostname]"):

Command used to invoke ansible:

ansible-playbook -i /inventory/inventory.ini \
    --become \
    remove-node.yml

Output of ansible run:

TASK [reset | Restart network] *********************************************************************************************************************************************
fatal: [worker0]: FAILED! => {"changed": false, "msg": "Could not find the requested service network: host"}
fatal: [worker1]: FAILED! => {"changed": false, "msg": "Could not find the requested service network: host"}
PLAY RECAP *****************************************************************************************************************************************************************
localhost                  : ok=1    changed=0    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0
master0                    : ok=13   changed=0    unreachable=0    failed=0    skipped=35   rescued=0    ignored=2
worker0                    : ok=30   changed=3    unreachable=0    failed=1    skipped=54   rescued=0    ignored=0
worker1                    : ok=30   changed=3    unreachable=0    failed=1    skipped=48   rescued=0    ignored=0

Anything else do we need to know:

@guni1192 guni1192 added the kind/bug Categorizes issue or PR as related to a bug. label Feb 7, 2021
@floryut
Copy link
Member

floryut commented Feb 8, 2021

@guni1192 Could you propose a PR with this change ?

@guni1192
Copy link
Contributor Author

guni1192 commented Feb 8, 2021

@floryut Sure.

@sancho21
Copy link

sancho21 commented Feb 2, 2024

Hi. The same issue happens in AlmaLinux 9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants