← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1960845] [NEW] OracleLinux8 is not listed as a variant of RHEL8. Network renderer does not work

 

Public bug reported:

When trying to render network config for Oracle Linux 8, cloud-init
fails because the distro is not listed as a variant, and because of
this, it selects the wrong renderer.

Cloud-init V 21.4
OS: Oracle Linux 8.5
Cloud: VSphere
Datasource: VMware
Metadata:
# cloud-init
instance-id: ITD-TerraformTest-01
local-hostname: ITD-TerraformTest-01
network:
  renderers: ['sysconfig'] # attempt to force renderer
  version: 1
  config:
    - type: physical
      name: ens192
      subnets:
        - type: static
          address: "192.168.20.57/24"
          gateway: "192.168.20.254"
          dns_nameservers:
            - "192.168.20.104"
            - "8.8.8.8"
          dns_search:
            - "fairwarning.com"

userdata:
system_info:
  network:
    renderers: ['sysconfig']
bootcmd:
    - ifdown ens192
    - sed -i 's/NM_CONTROLLED=no/NM_CONTROLLED=yes/g' /etc/sysconfig/network-scripts/ifcfg-ens192
    - nmcli connection reload
    - ifup ens192

CLoud-init log failure:
KeyError: "getpwnam(): name not found: 'systemd-network'"

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/cloud_init-21.4-py3.6.egg/cloudinit/cmd/main.py", line 689, in status_wrapper
    ret = functor(name, args)
  File "/usr/local/lib/python3.6/site-packages/cloud_init-21.4-py3.6.egg/cloudinit/cmd/main.py", line 398, in main_init
    init.apply_network_config(bring_up=bring_up_interfaces)
  File "/usr/local/lib/python3.6/site-packages/cloud_init-21.4-py3.6.egg/cloudinit/stages.py", line 836, in apply_network_config
    netcfg, bring_up=bring_up)
  File "/usr/local/lib/python3.6/site-packages/cloud_init-21.4-py3.6.egg/cloudinit/distros/__init__.py", line 222, in apply_netwo                                             rk_config
    self._write_network_state(network_state)
  File "/usr/local/lib/python3.6/site-packages/cloud_init-21.4-py3.6.egg/cloudinit/distros/__init__.py", line 125, in _write_netw                                             ork_state
    renderer.render_network_state(network_state)
  File "/usr/local/lib/python3.6/site-packages/cloud_init-21.4-py3.6.egg/cloudinit/net/networkd.py", line 226, in render_network_                                             state
    self.create_network_file(k, v, fp_nwkd)
  File "/usr/local/lib/python3.6/site-packages/cloud_init-21.4-py3.6.egg/cloudinit/net/networkd.py", line 215, in create_network_                                             file
    util.chownbyname(net_fn, net_fn_owner, net_fn_owner)
  File "/usr/local/lib/python3.6/site-packages/cloud_init-21.4-py3.6.egg/cloudinit/util.py", line 1434, in chownbyname
    raise OSError("Unknown user or group: %s" % (e)) from e
OSError: Unknown user or group: "getpwnam(): name not found: 'systemd-network'"

** Affects: cloud-init
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to cloud-init.
https://bugs.launchpad.net/bugs/1960845

Title:
  OracleLinux8 is not listed as a variant of RHEL8. Network renderer
  does not work

Status in cloud-init:
  New

Bug description:
  When trying to render network config for Oracle Linux 8, cloud-init
  fails because the distro is not listed as a variant, and because of
  this, it selects the wrong renderer.

  Cloud-init V 21.4
  OS: Oracle Linux 8.5
  Cloud: VSphere
  Datasource: VMware
  Metadata:
  # cloud-init
  instance-id: ITD-TerraformTest-01
  local-hostname: ITD-TerraformTest-01
  network:
    renderers: ['sysconfig'] # attempt to force renderer
    version: 1
    config:
      - type: physical
        name: ens192
        subnets:
          - type: static
            address: "192.168.20.57/24"
            gateway: "192.168.20.254"
            dns_nameservers:
              - "192.168.20.104"
              - "8.8.8.8"
            dns_search:
              - "fairwarning.com"

  userdata:
  system_info:
    network:
      renderers: ['sysconfig']
  bootcmd:
      - ifdown ens192
      - sed -i 's/NM_CONTROLLED=no/NM_CONTROLLED=yes/g' /etc/sysconfig/network-scripts/ifcfg-ens192
      - nmcli connection reload
      - ifup ens192

  CLoud-init log failure:
  KeyError: "getpwnam(): name not found: 'systemd-network'"

  The above exception was the direct cause of the following exception:

  Traceback (most recent call last):
    File "/usr/local/lib/python3.6/site-packages/cloud_init-21.4-py3.6.egg/cloudinit/cmd/main.py", line 689, in status_wrapper
      ret = functor(name, args)
    File "/usr/local/lib/python3.6/site-packages/cloud_init-21.4-py3.6.egg/cloudinit/cmd/main.py", line 398, in main_init
      init.apply_network_config(bring_up=bring_up_interfaces)
    File "/usr/local/lib/python3.6/site-packages/cloud_init-21.4-py3.6.egg/cloudinit/stages.py", line 836, in apply_network_config
      netcfg, bring_up=bring_up)
    File "/usr/local/lib/python3.6/site-packages/cloud_init-21.4-py3.6.egg/cloudinit/distros/__init__.py", line 222, in apply_netwo                                             rk_config
      self._write_network_state(network_state)
    File "/usr/local/lib/python3.6/site-packages/cloud_init-21.4-py3.6.egg/cloudinit/distros/__init__.py", line 125, in _write_netw                                             ork_state
      renderer.render_network_state(network_state)
    File "/usr/local/lib/python3.6/site-packages/cloud_init-21.4-py3.6.egg/cloudinit/net/networkd.py", line 226, in render_network_                                             state
      self.create_network_file(k, v, fp_nwkd)
    File "/usr/local/lib/python3.6/site-packages/cloud_init-21.4-py3.6.egg/cloudinit/net/networkd.py", line 215, in create_network_                                             file
      util.chownbyname(net_fn, net_fn_owner, net_fn_owner)
    File "/usr/local/lib/python3.6/site-packages/cloud_init-21.4-py3.6.egg/cloudinit/util.py", line 1434, in chownbyname
      raise OSError("Unknown user or group: %s" % (e)) from e
  OSError: Unknown user or group: "getpwnam(): name not found: 'systemd-network'"

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1960845/+subscriptions



Follow ups