← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1671883] Re: chpasswd regression

 

** Changed in: cloud-init
       Status: Fix Committed => Fix Released

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

Title:
  chpasswd regression

Status in cloud-init:
  Fix Released

Bug description:
  Last night's integration tests failed on a regression to the chpasswd
  value. All three tested releases with the same failures:

  set_password
  set_password_expire
  set_password_list

  Yesterday a new commit was accepted around chpasswd and allowing new types of list:
  https://git.launchpad.net/cloud-init/commit/?id=7f2b51054a5defec4c04fc40026bda7dd29f69fe

  set_password.yaml:  
    chpasswd: { expire: False }

  Traceback (most recent call last):
    File "/usr/lib/python3/dist-packages/cloudinit/stages.py", line 783, in _run_modules
      freq=freq)
    File "/usr/lib/python3/dist-packages/cloudinit/cloud.py", line 54, in run
      return self._runners.run(name, functor, args, freq, clear_on_fail)
    File "/usr/lib/python3/dist-packages/cloudinit/helpers.py", line 187, in run
      results = functor(*args)
    File "/usr/lib/python3/dist-packages/cloudinit/config/cc_set_passwords.py", line 99, in handle
      plist = plist.spitlines()
  AttributeError: 'str' object has no attribute 'spitlines'

  
  set_password_expire.yaml:  
    chpasswd: { expire: True }

  Traceback (most recent call last):
    File "/usr/lib/python3/dist-packages/cloudinit/stages.py", line 783, in _run_modules
      freq=freq)
    File "/usr/lib/python3/dist-packages/cloudinit/cloud.py", line 54, in run
      return self._runners.run(name, functor, args, freq, clear_on_fail)
    File "/usr/lib/python3/dist-packages/cloudinit/helpers.py", line 187, in run
      results = functor(*args)
    File "/usr/lib/python3/dist-packages/cloudinit/config/cc_set_passwords.py", line 92, in handle
      if isinstance(chfg['list'], list):
  KeyError: 'list'

  
  set_password_list.yaml:    
    chpasswd:
      list: |
        tom:mypassword123!
        dick:R
        harry:Random

  Traceback (most recent call last):
    File "/usr/lib/python3/dist-packages/cloudinit/stages.py", line 783, in _run_modules
      freq=freq)
    File "/usr/lib/python3/dist-packages/cloudinit/cloud.py", line 54, in run
      return self._runners.run(name, functor, args, freq, clear_on_fail)
    File "/usr/lib/python3/dist-packages/cloudinit/helpers.py", line 187, in run
      results = functor(*args)
    File "/usr/lib/python3/dist-packages/cloudinit/config/cc_set_passwords.py", line 99, in handle
      plist = plist.spitlines()
  AttributeError: 'str' object has no attribute 'spitlines'

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


References