Merge ~chad.smith/cloud-init:feature/1797480-azure-support-gen2-instances into cloud-init:master
Proposed by
Chad Smith
Status: | Merged |
---|---|
Approved by: | Chad Smith |
Approved revision: | 93e9602e94b3d7e954c3a12db52fe8cc954c1f84 |
Merge reported by: | Server Team CI bot |
Merged at revision: | not available |
Proposed branch: | ~chad.smith/cloud-init:feature/1797480-azure-support-gen2-instances |
Merge into: | cloud-init:master |
Diff against target: |
32 lines (+17/-1) 1 file modified
udev/66-azure-ephemeral.rules (+17/-1) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Server Team CI bot | continuous-integration | Approve | |
Paul Meyer (community) | Approve | ||
cloud-init Commiters | Pending | ||
Review via email:
|
Commit message
azure: add udev rules to create cloud-init Gen2 disk name symlinks
Cloud-init delivers udev rules on Azure to create the following symlinks:
- /dev/disk/
- /dev/disk/
- /dev/disk/
- /dev/disk/
Cloud-init cc_disk_setup expects presence of these dev links in order to
setup the mounted ephemeral disks. Gen1 instances udev rules match based
only a DEVICE_ID attribute that no longer exists on Gen2 instances.
Supplement existing Gen1 rules with matches on specitic SCSI target/lun
path 0:0:0 and 0:0:1 and generate links for azure_root and azure_resource
respectively.
LP: #1797480
To post a comment you must log in.
To test:
Gen2 instances are only on eastus region or westeurope I believe
# Spawn gen1 & gen2, install this version of cloud-init and run cloud-init clean --reboot --logs cloud-init. log
# Ensure proper /dev/disk/cloud symllinks exist and no Tracebacks in /var/log/
make deb
# Gen1 Canonical: UbuntuServer: 18.10-DAILY: latest --admin- username= root -g srugroup1 --admin- username= ubuntu --custom-data ../sethostname.yaml
az vm create --name=cosmic-gen1 --image=
vm_ip=`az vm list-ip-addresses --name cosmic-gen1 | jq -r '.[] | .virtualMachine .network. publicIpAddress es[].ipAddress' `
scp cloud-init*deb ubuntu@$vm_ip:
ssh ubuntu@$vm_ip grep Trace /var/log/ cloud-init. log; cloud-init. log; # Expect no trace
echo '--- Expect gen1 cloud disk dev links for root and resource + partiions';
ssh ubuntu@$vm_ip ls -l /dev/disk/cloud;
ssh ubuntu@$vm_ip 'sudo dpkg -i ./cloud-init*deb';
ssh ubuntu@$vm_ip 'sudo cloud-init clean --logs --reboot'
echo '--- Expect same gen1 cloud disk dev links for root and resource + partiions';
ssh ubuntu@$vm_ip ls -l /dev/disk/cloud;
echo '--- Expect no Traceback";
ubuntu@$vm_ip grep Trace /var/log/
# Gen2 Canonical: UbuntuServer: 18.10-DAILY: latest --admin- username= root -g srugroup1 --admin- username= ubuntu --custom-data ../sethostname.yaml --size Standard_DC2s -l eastus
az vm create --name=cosmic-gen2 --image=
vm_ip=`az vm list-ip-addresses --name cosmic-gen1 | jq -r '.[] | .virtualMachine .network. publicIpAddress es[].ipAddress' `
make deb
echo '--- Expect Traceback on Gen2 with stock cloud-init"; cloud-init. log; cloud-init. log; # Expect no trace
ssh ubuntu@$vm_ip grep Trace -A 8 /var/log/
echo '--- Expect no Gen2 cloud disk dev links for root and resource + partiions';
ssh ubuntu@$vm_ip ls -l /dev/disk/cloud;
ssh ubuntu@$vm_ip 'sudo dpkg -i ./cloud-init*deb';
ssh ubuntu@$vm_ip 'sudo cloud-init clean --logs --reboot'
echo '--- Expect Gen2 cloud disk dev links for root and resource + partiions';
ssh ubuntu@$vm_ip ls -l /dev/disk/cloud;
echo '--- Expect no Traceback after upgrade";
ubuntu@$vm_ip grep Trace /var/log/