← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1944109] [NEW] Centos8 fails with resolv_conf.py parse error on 21.1-7.el8

 

Public bug reported:

Although it fails, the dns has been properly configured

Running over Ansible 2.9 against ovirt 4.6

~]# cat /var/log/cloud-init-output.log
Cloud-init v. 21.1-7.el8 running 'init-local' at Mon, 20 Sep 2021 08:59:52 +0000. Up 3.11 seconds.
2021-09-20 08:59:53,208 - util.py[WARNING]: failed stage init-local
failed run of stage init-local
------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/cloudinit/distros/parsers/resolv_conf.py", line 152, in _parse
    (cfg_opt, cfg_values) = head.split(None, 1)
ValueError: not enough values to unpack (expected 2, got 1)

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

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/cloudinit/cmd/main.py", line 652, in status_wrapper
    ret = functor(name, args)
  File "/usr/lib/python3.6/site-packages/cloudinit/cmd/main.py", line 361, in main_init
    init.apply_network_config(bring_up=bool(mode != sources.DSMODE_LOCAL))
  File "/usr/lib/python3.6/site-packages/cloudinit/stages.py", line 735, in apply_network_config
    return self.distro.apply_network_config(netcfg, bring_up=bring_up)
  File "/usr/lib/python3.6/site-packages/cloudinit/distros/__init__.py", line 206, in apply_network_config
    dev_names = self._write_network_config(netconfig)
  File "/usr/lib/python3.6/site-packages/cloudinit/distros/rhel.py", line 66, in _write_network_config
    return self._supported_write_network_config(netconfig)
  File "/usr/lib/python3.6/site-packages/cloudinit/distros/__init__.py", line 121, in _supported_write_network_config
    renderer.render_network_config(network_config)
  File "/usr/lib/python3.6/site-packages/cloudinit/net/renderer.py", line 56, in render_network_config
    templates=templates, target=target)
  File "/usr/lib/python3.6/site-packages/cloudinit/net/sysconfig.py", line 907, in render_network_state
    existing_dns_path=dns_path)
  File "/usr/lib/python3.6/site-packages/cloudinit/net/sysconfig.py", line 759, in _render_dns
    content.add_nameserver(nameserver)
  File "/usr/lib/python3.6/site-packages/cloudinit/distros/parsers/resolv_conf.py", line 76, in add_nameserver
    self.parse()
  File "/usr/lib/python3.6/site-packages/cloudinit/distros/parsers/resolv_conf.py", line 24, in parse
    self._contents = self._parse(self._text)
  File "/usr/lib/python3.6/site-packages/cloudinit/distros/parsers/resolv_conf.py", line 156, in _parse
    ) from e
OSError: Incorrectly formatted resolv.conf line 2

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


** Tags: ovirt

-- 
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/1944109

Title:
  Centos8 fails with resolv_conf.py parse error  on 21.1-7.el8

Status in cloud-init:
  New

Bug description:
  Although it fails, the dns has been properly configured

  Running over Ansible 2.9 against ovirt 4.6

  ~]# cat /var/log/cloud-init-output.log
  Cloud-init v. 21.1-7.el8 running 'init-local' at Mon, 20 Sep 2021 08:59:52 +0000. Up 3.11 seconds.
  2021-09-20 08:59:53,208 - util.py[WARNING]: failed stage init-local
  failed run of stage init-local
  ------------------------------------------------------------
  Traceback (most recent call last):
    File "/usr/lib/python3.6/site-packages/cloudinit/distros/parsers/resolv_conf.py", line 152, in _parse
      (cfg_opt, cfg_values) = head.split(None, 1)
  ValueError: not enough values to unpack (expected 2, got 1)

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

  Traceback (most recent call last):
    File "/usr/lib/python3.6/site-packages/cloudinit/cmd/main.py", line 652, in status_wrapper
      ret = functor(name, args)
    File "/usr/lib/python3.6/site-packages/cloudinit/cmd/main.py", line 361, in main_init
      init.apply_network_config(bring_up=bool(mode != sources.DSMODE_LOCAL))
    File "/usr/lib/python3.6/site-packages/cloudinit/stages.py", line 735, in apply_network_config
      return self.distro.apply_network_config(netcfg, bring_up=bring_up)
    File "/usr/lib/python3.6/site-packages/cloudinit/distros/__init__.py", line 206, in apply_network_config
      dev_names = self._write_network_config(netconfig)
    File "/usr/lib/python3.6/site-packages/cloudinit/distros/rhel.py", line 66, in _write_network_config
      return self._supported_write_network_config(netconfig)
    File "/usr/lib/python3.6/site-packages/cloudinit/distros/__init__.py", line 121, in _supported_write_network_config
      renderer.render_network_config(network_config)
    File "/usr/lib/python3.6/site-packages/cloudinit/net/renderer.py", line 56, in render_network_config
      templates=templates, target=target)
    File "/usr/lib/python3.6/site-packages/cloudinit/net/sysconfig.py", line 907, in render_network_state
      existing_dns_path=dns_path)
    File "/usr/lib/python3.6/site-packages/cloudinit/net/sysconfig.py", line 759, in _render_dns
      content.add_nameserver(nameserver)
    File "/usr/lib/python3.6/site-packages/cloudinit/distros/parsers/resolv_conf.py", line 76, in add_nameserver
      self.parse()
    File "/usr/lib/python3.6/site-packages/cloudinit/distros/parsers/resolv_conf.py", line 24, in parse
      self._contents = self._parse(self._text)
    File "/usr/lib/python3.6/site-packages/cloudinit/distros/parsers/resolv_conf.py", line 156, in _parse
      ) from e
  OSError: Incorrectly formatted resolv.conf line 2

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



Follow ups