← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1858825] [NEW] running as non-root on amazon linux 2 throws python errors

 

Public bug reported:

Running cloud-init as non-privileged user on Amazon Linux 2
(18.5-2.amzn2) throws 'NameError: global name 'PermissionError' is not
defined' errors.

Eg:

$ cloud-init status
Traceback (most recent call last):
  File "/usr/bin/cloud-init", line 11, in <module>
    load_entry_point('cloud-init==18.5', 'console_scripts', 'cloud-init')()
  File "/usr/lib/python2.7/site-packages/cloudinit/cmd/main.py", line 892, in main
    get_uptime=True, func=functor, args=(name, args))
  File "/usr/lib/python2.7/site-packages/cloudinit/util.py", line 2546, in log_time
    ret = func(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/cloudinit/cmd/status.py", line 53, in handle_status_args
    init.read_cfg()
  File "/usr/lib/python2.7/site-packages/cloudinit/stages.py", line 174, in read_cfg
    self._cfg = self._read_cfg(extra_fns)
  File "/usr/lib/python2.7/site-packages/cloudinit/stages.py", line 183, in _read_cfg
    return merger.cfg
  File "/usr/lib/python2.7/site-packages/cloudinit/helpers.py", line 278, in cfg
    self._cfg = self._read_cfg()
  File "/usr/lib/python2.7/site-packages/cloudinit/helpers.py", line 268, in _read_cfg
    cfgs.extend(self._get_instance_configs())
  File "/usr/lib/python2.7/site-packages/cloudinit/helpers.py", line 242, in _get_instance_configs
    except PermissionError:
NameError: global name 'PermissionError' is not defined

** 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/1858825

Title:
  running as non-root on amazon linux 2 throws python errors

Status in cloud-init:
  New

Bug description:
  Running cloud-init as non-privileged user on Amazon Linux 2
  (18.5-2.amzn2) throws 'NameError: global name 'PermissionError' is not
  defined' errors.

  Eg:

  $ cloud-init status
  Traceback (most recent call last):
    File "/usr/bin/cloud-init", line 11, in <module>
      load_entry_point('cloud-init==18.5', 'console_scripts', 'cloud-init')()
    File "/usr/lib/python2.7/site-packages/cloudinit/cmd/main.py", line 892, in main
      get_uptime=True, func=functor, args=(name, args))
    File "/usr/lib/python2.7/site-packages/cloudinit/util.py", line 2546, in log_time
      ret = func(*args, **kwargs)
    File "/usr/lib/python2.7/site-packages/cloudinit/cmd/status.py", line 53, in handle_status_args
      init.read_cfg()
    File "/usr/lib/python2.7/site-packages/cloudinit/stages.py", line 174, in read_cfg
      self._cfg = self._read_cfg(extra_fns)
    File "/usr/lib/python2.7/site-packages/cloudinit/stages.py", line 183, in _read_cfg
      return merger.cfg
    File "/usr/lib/python2.7/site-packages/cloudinit/helpers.py", line 278, in cfg
      self._cfg = self._read_cfg()
    File "/usr/lib/python2.7/site-packages/cloudinit/helpers.py", line 268, in _read_cfg
      cfgs.extend(self._get_instance_configs())
    File "/usr/lib/python2.7/site-packages/cloudinit/helpers.py", line 242, in _get_instance_configs
      except PermissionError:
  NameError: global name 'PermissionError' is not defined

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