One available config entry in the Pro module in cloud-init is the disable_auto_attach directive, for example:
ubuntu_pro:
features:
disable_auto_attach: True
This means that cloud-init will not attempt to run the auto-attach operation and neither the ua-auto-attach service.
However, on GCP/Azure, we have the ubuntu-advantage.service that keeps polling for a Pro license to auto-attach on GCP/Azure. Since a Pro image already have a valid license, the daemon will auto-attach on those images, regardless of that cloud-init userdata directive.
Expected behavior
That cloud-init directive should be respected by the Pro client.
It seems that we can change the daemon to use the full_auto_attach API, which already respects that configuration logic introduced by cloud-init.
Current behavior
The Pro image will boot attached, even if the disable_auto_attach directive is being set.
To Reproduce
Please include details on how to reproduce the bug.
Launch a GCP/Azure image with the following userdata:
ubuntu_pro:
features:
disable_auto_attach: True
Check that after boot, the machine ends up attached
System information:
This should only affect GCP/Azure Pro cloud images
Description of the bug
One available config entry in the Pro module in cloud-init is the
disable_auto_attach
directive, for example:This means that cloud-init will not attempt to run the auto-attach operation and neither the
ua-auto-attach
service.However, on GCP/Azure, we have the
ubuntu-advantage.service
that keeps polling for a Pro license to auto-attach on GCP/Azure. Since a Pro image already have a valid license, the daemon will auto-attach on those images, regardless of that cloud-init userdata directive.Expected behavior
That cloud-init directive should be respected by the Pro client.
It seems that we can change the daemon to use the
full_auto_attach
API, which already respects that configuration logic introduced by cloud-init.Current behavior
The Pro image will boot attached, even if the
disable_auto_attach
directive is being set.To Reproduce
Please include details on how to reproduce the bug.
System information:
This should only affect GCP/Azure Pro cloud images