Are you sure this is right? Yes, the systemd unit no longer fails because the patch ignored the script failure, but does it *work*? The package update has no changes to /usr/share/ec2-instance-connect/eic_harvest_hostkeys to match the string format for a local zone still. So while the feature is available in local and wavelength zones the package in -proposed fails to address the underlying failure and so ec2-instance-connect still broken in those zones (just silently now).
Please look at the grep on line 101 of the script:
# Validate the zone
/bin/echo "${zone}" | /usr/bin/head -n 1 | /bin/grep -Eq "^([a-z]+-){2,3}[0-9][a-z]$" || exit 255
The script needs to handle matches to the existing regex, but also local zones like 'us-west-2-lax-1b' and wavelength zones like 'us-west-2-wl1-den-wlz-1'
I have tested in AWS local zone us-west-2-lax-1a
xenial: 98a562 connect 1.1.12+ dfsg1-0ubuntu3~ 16.04.2
image: ami-008b09448b9
build serial: 20201014
ec2-instance-
bionic: 09e57b connect 1.1.12+ dfsg1-0ubuntu3~ 18.04.2
image: ami-02701bcdc55
build serial: 20210224
ec2-instance-
focal: 68e7db connect 1.1.12+ dfsg1-0ubuntu3. 20.04.1
image: ami-0ca5c3bd5a2
build serial: 20210223
ec2-instance-
groovy: 73ef4c connect 1.1.12+ dfsg1-0ubuntu3. 20.10.1
image: ami-0c1204e0c5e
build serial: 20210325
ec2-instance-
Are you sure this is right? Yes, the systemd unit no longer fails because the patch ignored the script failure, but does it *work*? The package update has no changes to /usr/share/ ec2-instance- connect/ eic_harvest_ hostkeys to match the string format for a local zone still. So while the feature is available in local and wavelength zones the package in -proposed fails to address the underlying failure and so ec2-instance- connect still broken in those zones (just silently now).
Again, here is the failure:
$ sudo sh -x /usr/share/ ec2-instance- connect/ eic_harvest_ hostkeys 2>&1 | tail -9 metadata- token: AQAEAF6AxckVUQF Pqe3ivPjLa0b7dl vf4To2TaAReHD- lMpqgvuXBQ= = http:// 169.254. 169.254/ latest/ meta-data/ placement/ availability- zone/ west-2- lax-1b +-){2,3} [0-9][a- z]$ eic-hostkey- WZBt1Vck
+ /usr/bin/curl -s -f -m 1 -H X-aws-ec2-
+ zone=us-
+ zone_exit=0
+ [ 0 -ne 0 ]
+ /bin/echo us-west-2-lax-1b
+ /usr/bin/head -n 1
+ /bin/grep -Eq ^([a-z]
+ exit 255
+ rm -rf /dev/shm/
Please look at the grep on line 101 of the script: +-){2,3} [0-9][a- z]$" || exit 255
# Validate the zone
/bin/echo "${zone}" | /usr/bin/head -n 1 | /bin/grep -Eq "^([a-z]
The script needs to handle matches to the existing regex, but also local zones like 'us-west-2-lax-1b' and wavelength zones like 'us-west- 2-wl1-den- wlz-1'