chpasswd regression

Bug #1671883 reported by Joshua Powers
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cloud-init
Fix Released
High
Unassigned

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'

Joshua Powers (powersj)
Changed in cloud-init:
importance: Undecided → High
Revision history for this message
Scott Moser (smoser) wrote :

fixed in 021ed9c960484dcb45941d48139ec86c2ce1f248

Changed in cloud-init:
status: New → Fix Committed
Revision history for this message
Joshua Powers (powersj) wrote :

Some issues fixed, however one run failure:
https://paste.ubuntu.com/24152754/

set_password.yaml:
  chpasswd: { expire: False }

https://jenkins.ubuntu.com/server/job/cloud-init-integration-x/115/consoleText

Joshua Powers (powersj)
Changed in cloud-init:
status: Fix Committed → Fix Released
Revision history for this message
James Falcon (falcojr) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.