package_reboot_if_required breaks power_state: shutdown
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init |
Invalid
|
Undecided
|
Unassigned |
Bug Description
I'm using the following User-Data file to provision a Ubuntu Server 20.04 VM(focal-
#cloud-config
hostname: UbuntuServer20.
manage_etc_hosts: true
user: ***
password: ***
ssh_authorized_
- ssh-ed25519 ***
chpasswd:
expire: False
#Packages to install
packages:
- qemu-guest-agent
#Packages and update configuration
package_update: true
package_upgrade: true
package_
#Set locale and timezone
locale: en_US
timezone: Europe/Stockholm
#Setup NTP server
ntp:
enabled: true
ntp_client: ntp
servers:
- sth1.ntp.se
- sth2.ntp.se
- sth3.ntp.se
- sth4.ntp.se
#Setup apt source
apt:
primary:
- arches: [amd64]
uri: http://
write_files:
- content: |
sshd : 10.20.0.1
path: /etc/hosts.allow
append: True
- content: |
#Custom SSH configuration
Protocol 2
path: /etc/ssh/
permissions: '0600'
owner: root:root
power_state:
delay: "+1"
mode: poweroff
timeout: 120
condition: True
The problem is that the VM never shuts down, it does however reboot for package installation. But after that nothing more happens.
However if I also use:
cloud_final_
- power-state-change
The power_state command works, but then the VM never reboots for packages upgrade.
Logfile