Public bug reported: cc_puppet fails to start the puppet service on Ubuntu Lunar.
Cloud config to reproduce it: ```yaml #cloud-config puppet: install: true install_type: packages start_service: true ``` $ cat /var/log/cloud-init.log ... 2023-01-16 11:07:57,416 - util.py[DEBUG]: Running module puppet (<module 'cloudinit.config.cc_puppet' from '/usr/lib/python3/dist-packages/cloudinit/config/cc_puppet.py'>) failed Traceback (most recent call last): File "/usr/lib/python3/dist-packages/cloudinit/config/modules.py", line 246, in _run_modules ran, _r = cc.run( File "/usr/lib/python3/dist-packages/cloudinit/cloud.py", line 67, in run return self._runners.run(name, functor, args, freq, clear_on_fail) File "/usr/lib/python3/dist-packages/cloudinit/helpers.py", line 185, in run results = functor(*args) File "/usr/lib/python3/dist-packages/cloudinit/config/cc_puppet.py", line 321, in handle _autostart_puppet(log) File "/usr/lib/python3/dist-packages/cloudinit/config/cc_puppet.py", line 135, in _autostart_puppet subp.subp(["systemctl", "enable", "puppet.service"], capture=False) File "/usr/lib/python3/dist-packages/cloudinit/subp.py", line 335, in subp raise ProcessExecutionError( cloudinit.subp.ProcessExecutionError: Unexpected error while running command. Command: ['systemctl', 'enable', 'puppet.service'] Exit code: 1 Reason: - Stdout: - Stderr: - ... The issue seems to be that puppet 7.20.0-1 is a transitional dummy package pointing to puppet-agent and puppet.service was renamed to puppet-agent.service but cloud-init is not aware of this and tries to enable the old puppet.service. In puppet 7.16 puppet.service was an alias pointing to puppet- agent.service [1]. [1] https://changelogs.ubuntu.com/changelogs/pool/universe/p/puppet- agent/puppet-agent_7.20.0-1/changelog ** Affects: cloud-init Importance: Medium Status: Triaged ** Attachment added: "cloud-init.tar.gz" https://bugs.launchpad.net/bugs/2002969/+attachment/5641673/+files/cloud-init.tar.gz ** Description changed: cc_puppet fails to start the puppet service on Ubuntu Lunar. Cloud config to reproduce it: ```yaml #cloud-config puppet: - install: true - install_type: packages - start_service: true + install: true + install_type: packages + start_service: true ``` $ cat /var/log/cloud-init.log ... 2023-01-16 11:07:57,416 - util.py[DEBUG]: Running module puppet (<module 'cloudinit.config.cc_puppet' from - '/usr/lib/python3/dist-packages/cloudinit/config/cc_puppet.py'>) failed + '/usr/lib/python3/dist-packages/cloudinit/config/cc_puppet.py'>) failed Traceback (most recent call last): - File "/usr/lib/python3/dist-packages/cloudinit/config/modules.py", line 246, in _run_modules - ran, _r = cc.run( - File "/usr/lib/python3/dist-packages/cloudinit/cloud.py", line 67, in run - return self._runners.run(name, functor, args, freq, clear_on_fail) - File "/usr/lib/python3/dist-packages/cloudinit/helpers.py", line 185, in run - results = functor(*args) - File "/usr/lib/python3/dist-packages/cloudinit/config/cc_puppet.py", line 321, in handle - _autostart_puppet(log) - File "/usr/lib/python3/dist-packages/cloudinit/config/cc_puppet.py", line 135, in _autostart_puppet - subp.subp(["systemctl", "enable", "puppet.service"], capture=False) - File "/usr/lib/python3/dist-packages/cloudinit/subp.py", line 335, in subp - raise ProcessExecutionError( + File "/usr/lib/python3/dist-packages/cloudinit/config/modules.py", line 246, in _run_modules + ran, _r = cc.run( + File "/usr/lib/python3/dist-packages/cloudinit/cloud.py", line 67, in run + return self._runners.run(name, functor, args, freq, clear_on_fail) + File "/usr/lib/python3/dist-packages/cloudinit/helpers.py", line 185, in run + results = functor(*args) + File "/usr/lib/python3/dist-packages/cloudinit/config/cc_puppet.py", line 321, in handle + _autostart_puppet(log) + File "/usr/lib/python3/dist-packages/cloudinit/config/cc_puppet.py", line 135, in _autostart_puppet + subp.subp(["systemctl", "enable", "puppet.service"], capture=False) + File "/usr/lib/python3/dist-packages/cloudinit/subp.py", line 335, in subp + raise ProcessExecutionError( cloudinit.subp.ProcessExecutionError: Unexpected error while running command. Command: ['systemctl', 'enable', 'puppet.service'] Exit code: 1 Reason: - Stdout: - Stderr: - ... - The issue seems that puppet 7.20.0-1 is a transitional dummy package - pointing to puppet-agent and puppet.service was renamed to puppet- - agent.service but cloud-init is not aware of this and tries to enable - the old puppet.service. + The issue seems to be that puppet 7.20.0-1 is a transitional dummy + package pointing to puppet-agent and puppet.service was renamed to + puppet-agent.service but cloud-init is not aware of this and tries to + enable the old puppet.service. In puppet 7.16 puppet.service was an alias pointing to puppet- agent.service [1]. [1] https://changelogs.ubuntu.com/changelogs/pool/universe/p/puppet- agent/puppet-agent_7.20.0-1/changelog ** Changed in: cloud-init Status: New => Triaged ** Changed in: cloud-init Importance: Undecided => Medium -- 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/2002969 Title: cc_puppet start service error on lunar Status in cloud-init: Triaged Bug description: cc_puppet fails to start the puppet service on Ubuntu Lunar. Cloud config to reproduce it: ```yaml #cloud-config puppet: install: true install_type: packages start_service: true ``` $ cat /var/log/cloud-init.log ... 2023-01-16 11:07:57,416 - util.py[DEBUG]: Running module puppet (<module 'cloudinit.config.cc_puppet' from '/usr/lib/python3/dist-packages/cloudinit/config/cc_puppet.py'>) failed Traceback (most recent call last): File "/usr/lib/python3/dist-packages/cloudinit/config/modules.py", line 246, in _run_modules ran, _r = cc.run( File "/usr/lib/python3/dist-packages/cloudinit/cloud.py", line 67, in run return self._runners.run(name, functor, args, freq, clear_on_fail) File "/usr/lib/python3/dist-packages/cloudinit/helpers.py", line 185, in run results = functor(*args) File "/usr/lib/python3/dist-packages/cloudinit/config/cc_puppet.py", line 321, in handle _autostart_puppet(log) File "/usr/lib/python3/dist-packages/cloudinit/config/cc_puppet.py", line 135, in _autostart_puppet subp.subp(["systemctl", "enable", "puppet.service"], capture=False) File "/usr/lib/python3/dist-packages/cloudinit/subp.py", line 335, in subp raise ProcessExecutionError( cloudinit.subp.ProcessExecutionError: Unexpected error while running command. Command: ['systemctl', 'enable', 'puppet.service'] Exit code: 1 Reason: - Stdout: - Stderr: - ... The issue seems to be that puppet 7.20.0-1 is a transitional dummy package pointing to puppet-agent and puppet.service was renamed to puppet-agent.service but cloud-init is not aware of this and tries to enable the old puppet.service. In puppet 7.16 puppet.service was an alias pointing to puppet- agent.service [1]. [1] https://changelogs.ubuntu.com/changelogs/pool/universe/p/puppet- agent/puppet-agent_7.20.0-1/changelog To manage notifications about this bug go to: https://bugs.launchpad.net/cloud-init/+bug/2002969/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : [email protected] Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp

