Duplicate host on Azure

Problem:
Create new host on Azure results in 2 hosts being created in Foreman (with same hostname).

Expected outcome:
Only one host is created in Foreman.

Foreman and Proxy versions:
1.24.3-1.el7.noarch

Foreman and Proxy plugin versions:

katello-3.14.1-1.el7.noarch
tfm-rubygem-azure_mgmt_storage-0.17.10-1.el7.noarch
tfm-rubygem-azure_mgmt_network-0.19.0-1.el7.noarch
tfm-rubygem-azure_mgmt_compute-0.18.7-1.el7.noarch
tfm-rubygem-azure_mgmt_resources-0.17.6-1.el7.noarch
tfm-rubygem-foreman_azure_rm-2.0.8-1.fm1_24.el7.noarch
tfm-rubygem-ms_rest_azure-0.11.1-1.el7.noarch

Distribution and version:
CentOS Linux release 7.8.2003

Other relevant data:
The host register from user_data script before being created in Foreman. Adding sleep 60 in user_data script before subscription-manger register fixed it. However I’m wondering why it takes so long to bootstrap (>2 min to retrieve IP address):

2020-09-15T09:38:33 [I|app|741b5289] Adding Compute instance for myhost.net
2020-09-15T09:40:39 [I|app|741b5289] Waiting for  myhost.net to become ready
2020-09-15T09:40:39 [I|app|741b5289] waiting for instance to acquire ip address
2020-09-15T09:40:39 [I|app|741b5289] Add DNS A record for myhost.net/10.138.1.6
2020-09-15T09:40:39 [I|app|741b5289] Add DNS PTR record for 10.138.1.6/myhost.net

Is this code involved here?

Any workaround?

Problem:
Create new host on Azure results in 2 hosts being created in Foreman (with same hostname).

Hello @Anthony_Chevalet,
could you check the value of *Administer > Settings > use_uuid_for_certificates setting? as this setting is recommended for consistent puppet certificate ids instead of hostnames in case of cloud provisioning.

1 Like

Hello @kgaikwad,

Thanks for your answer.
I’ve tried setting use_uuid_for_certificates=true but I get same behavior.
It’s actually not linked to puppet but to the subscription.
The host register before it’s completely created by Foreman, so there is one content host created by the subscription and few seconds after the original host get created by Foreman.
As you can see it takes more than 2 minutes to retrieve the IP address (which I think is not needed here with user_data):

2020-09-15T09:38:33 [I|app|741b5289] Adding Compute instance for myhost.net
2020-09-15T09:40:39 [I|app|741b5289] Waiting for  myhost.net to become ready
2020-09-15T09:40:39 [I|app|741b5289] waiting for instance to acquire ip address

During this time the host is already up and it is running the user_data script (so the register command).
I do not have this behavior on any other compute resource types. Only Azure is impacted.

Hello @Anthony_Chevalet!
Thanks for sharing the scenario of what’s happening while the orchestration process in case of Azure CR. Would you be able to share the logs as well that are generated while this provisioning?

Hello @apuntamb,

Here is the logs for the host creation:

2020-10-05T10:40:26 [I|app|5557a4ff] Started POST "/api/hosts" for 10.200.25.100 at 2020-10-05 10:40:26 +0000
2020-10-05T10:40:26 [I|app|5557a4ff] Processing by Api::V2::HostsController#create as JSON
2020-10-05T10:40:26 [I|app|5557a4ff]   Parameters: {"location_id"=>18, "organization_id"=>3, "host"=>{"name"=>"myhost", "location_id"=>18, "organization_id"=>3, "domain_id"=>39, "puppetclass_ids"=>[], "subnet_id"=>166, "compute_resource_id"=>117, "hostgroup_id"=>4, "image_id"=>122, "provision_method"=>"image", "compute_profile_id"=>1, "compute_attributes"=>{"volumes_attributes"=>{}, "image_id"=>"/subscriptions/[redacted]/resourceGroups/images/providers/Microsoft.Compute/images/base-image"}, "content_facet_attributes"=>{}, "subscription_facet_attributes"=>{}, "puppet_proxy_id"=>65, "puppet_ca_proxy_id"=>65, "build"=>true, "managed"=>true, "enabled"=>true, "overwrite"=>true, "interfaces_attributes"=>[{"compute_attributes"=>{"network"=>"/subscriptions/[redacted]/resourceGroups/infrastructure/providers/Microsoft.Network/virtualNetworks/main/subnets/private-main"}}]}, "apiv"=>"v2"}
2020-10-05T10:40:27 [I|app|5557a4ff] Skipping user group update for user admin as usergroup_sync is disabled
2020-10-05T10:40:27 [I|app|5557a4ff] Authorized user admin(Foreman Admin)
2020-10-05T10:40:27 [I|app|5557a4ff] Rendering UserData template for myhost.net
2020-10-05T10:40:27 [I|app|5557a4ff] Revoked old certificates and enabled autosign for UserData
2020-10-05T10:40:27 [I|app|5557a4ff] Adding Compute instance for myhost.net
2020-10-05T10:42:48 [I|app|5557a4ff] Waiting for myhost.net to become ready
2020-10-05T10:42:48 [I|app|5557a4ff] waiting for instance to acquire ip address
2020-10-05T10:42:48 [I|app|5557a4ff] Add DNS A record for myhost.net/10.138.100.6
2020-10-05T10:42:49 [I|app|5557a4ff] Add DNS PTR record for 10.138.100.6/myhost.net
2020-10-05T10:42:55 [I|app|5557a4ff] Processed 7 tasks from queue 'Host::Managed Main', completed 7/7
2020-10-05T10:42:55 [I|aud|5557a4ff] Nic::Managed (9844) create event on mac 
2020-10-05T10:42:55 [I|aud|5557a4ff] Nic::Managed (9844) create event on ip 10.138.100.6
2020-10-05T10:42:55 [I|aud|5557a4ff] Nic::Managed (9844) create event on type Nic::Managed
2020-10-05T10:42:55 [I|aud|5557a4ff] Nic::Managed (9844) create event on name myhost.net
2020-10-05T10:42:55 [I|aud|5557a4ff] Nic::Managed (9844) create event on host_id 7777
2020-10-05T10:42:55 [I|aud|5557a4ff] Nic::Managed (9844) create event on subnet_id 166
2020-10-05T10:42:55 [I|aud|5557a4ff] Nic::Managed (9844) create event on domain_id 39
2020-10-05T10:42:55 [I|aud|5557a4ff] Nic::Managed (9844) create event on attrs {}
2020-10-05T10:42:55 [I|aud|5557a4ff] Nic::Managed (9844) create event on provider 
2020-10-05T10:42:55 [I|aud|5557a4ff] Nic::Managed (9844) create event on username 
2020-10-05T10:42:55 [I|aud|5557a4ff] Nic::Managed (9844) create event on password [redacted]
2020-10-05T10:42:55 [I|aud|5557a4ff] Nic::Managed (9844) create event on virtual false
2020-10-05T10:42:55 [I|aud|5557a4ff] Nic::Managed (9844) create event on link true
2020-10-05T10:42:55 [I|aud|5557a4ff] Nic::Managed (9844) create event on identifier 
2020-10-05T10:42:55 [I|aud|5557a4ff] Nic::Managed (9844) create event on tag 
2020-10-05T10:42:55 [I|aud|5557a4ff] Nic::Managed (9844) create event on attached_to 
2020-10-05T10:42:55 [I|aud|5557a4ff] Nic::Managed (9844) create event on managed true
2020-10-05T10:42:55 [I|aud|5557a4ff] Nic::Managed (9844) create event on mode balance-rr
2020-10-05T10:42:55 [I|aud|5557a4ff] Nic::Managed (9844) create event on attached_devices 
2020-10-05T10:42:55 [I|aud|5557a4ff] Nic::Managed (9844) create event on bond_options 
2020-10-05T10:42:55 [I|aud|5557a4ff] Nic::Managed (9844) create event on primary true
2020-10-05T10:42:55 [I|aud|5557a4ff] Nic::Managed (9844) create event on provision true
2020-10-05T10:42:55 [I|aud|5557a4ff] Nic::Managed (9844) create event on compute_attributes {"network"=>"/subscriptions/[redacted]/resourceGroups/infrastructure/providers/Microsoft.Network/virtualNetworks/main/subnets/private-main", "public_ip"=>"None", "private_ip"=>"false", "from_profile"=>"1-Small"}
2020-10-05T10:42:55 [I|aud|5557a4ff] Nic::Managed (9844) create event on ip6 
2020-10-05T10:42:55 [I|aud|5557a4ff] Nic::Managed (9844) create event on subnet6_id 
2020-10-05T10:42:55 [I|aud|5557a4ff] Nic::Managed (9844) create event on execution true
2020-10-05T10:42:55 [I|aud|5557a4ff] Host::Base (7777) create event on name myhost.net
2020-10-05T10:42:55 [I|aud|5557a4ff] Host::Base (7777) create event on root_pass [redacted]
2020-10-05T10:42:55 [I|aud|5557a4ff] Host::Base (7777) create event on architecture_id 1
2020-10-05T10:42:55 [I|aud|5557a4ff] Host::Base (7777) create event on operatingsystem_id 54
2020-10-05T10:42:55 [I|aud|5557a4ff] Host::Base (7777) create event on environment_id 164
2020-10-05T10:42:55 [I|aud|5557a4ff] Host::Base (7777) create event on ptable_id 
2020-10-05T10:42:55 [I|aud|5557a4ff] Host::Base (7777) create event on medium_id 
2020-10-05T10:42:55 [I|aud|5557a4ff] Host::Base (7777) create event on build true
2020-10-05T10:42:55 [I|aud|5557a4ff] Host::Base (7777) create event on comment 
2020-10-05T10:42:55 [I|aud|5557a4ff] Host::Base (7777) create event on disk 
2020-10-05T10:42:55 [I|aud|5557a4ff] Host::Base (7777) create event on installed_at 
2020-10-05T10:42:55 [I|aud|5557a4ff] Host::Base (7777) create event on model_id 
2020-10-05T10:42:55 [I|aud|5557a4ff] Host::Base (7777) create event on hostgroup_id 4
2020-10-05T10:42:55 [I|aud|5557a4ff] Host::Base (7777) create event on owner_id 5
2020-10-05T10:42:55 [I|aud|5557a4ff] Host::Base (7777) create event on owner_type User
2020-10-05T10:42:55 [I|aud|5557a4ff] Host::Base (7777) create event on enabled true
2020-10-05T10:42:55 [I|aud|5557a4ff] Host::Base (7777) create event on puppet_ca_proxy_id 65
2020-10-05T10:42:55 [I|aud|5557a4ff] Host::Base (7777) create event on managed true
2020-10-05T10:42:55 [I|aud|5557a4ff] Host::Base (7777) create event on use_image 
2020-10-05T10:42:55 [I|aud|5557a4ff] Host::Base (7777) create event on image_file 
2020-10-05T10:42:55 [I|aud|5557a4ff] Host::Base (7777) create event on uuid myhost
2020-10-05T10:42:55 [I|aud|5557a4ff] Host::Base (7777) create event on compute_resource_id 117
2020-10-05T10:42:55 [I|aud|5557a4ff] Host::Base (7777) create event on puppet_proxy_id 65
2020-10-05T10:42:55 [I|aud|5557a4ff] Host::Base (7777) create event on certname 
2020-10-05T10:42:55 [I|aud|5557a4ff] Host::Base (7777) create event on image_id 122
2020-10-05T10:42:55 [I|aud|5557a4ff] Host::Base (7777) create event on organization_id 3
2020-10-05T10:42:55 [I|aud|5557a4ff] Host::Base (7777) create event on location_id 18
2020-10-05T10:42:55 [I|aud|5557a4ff] Host::Base (7777) create event on otp 
2020-10-05T10:42:55 [I|aud|5557a4ff] Host::Base (7777) create event on realm_id 
2020-10-05T10:42:55 [I|aud|5557a4ff] Host::Base (7777) create event on compute_profile_id 1
2020-10-05T10:42:55 [I|aud|5557a4ff] Host::Base (7777) create event on provision_method image
2020-10-05T10:42:55 [I|aud|5557a4ff] Host::Base (7777) create event on grub_pass [redacted]
2020-10-05T10:42:55 [I|aud|5557a4ff] Host::Base (7777) create event on pxe_loader 
2020-10-05T10:42:55 [I|aud|5557a4ff] Host::Base (7777) create event on openscap_proxy_id 
2020-10-05T10:42:55 [I|aud|5557a4ff] Host::Base (7777) create event on discovery_rule_id 
2020-10-05T10:42:55 [I|aud|5557a4ff] Host::Base (7777) create event on initiated_at 
2020-10-05T10:42:55 [I|aud|5557a4ff] Host::Base (7777) create event on build_errors 
2020-10-05T10:42:55 [I|aud|5557a4ff] Host::Base (7777) create event on content_facet_attributes {"id"=>nil, "host_id"=>nil, "uuid"=>nil, "content_view_id"=>4, "lifecycle_environment_id"=>9, "kickstart_repository_id"=>nil, "content_source_id"=>nil, "installable_security_errata_count"=>0, "installable_enhancement_errata_count"=>0, "installable_bugfix_errata_count"=>0, "applicable_rpm_count"=>0, "upgradable_rpm_count"=>0, "applicable_module_stream_count"=>0, "upgradable_module_stream_count"=>0}
2020-10-05T10:42:55 [I|aud|5557a4ff] Host::Base (7777) create event on ansible_role_ids []
2020-10-05T10:42:55 [I|aud|5557a4ff] Host::Base (7611) create event on host_id 7777
2020-10-05T10:42:55 [I|aud|5557a4ff] Host::Base (7611) create event on uuid 
2020-10-05T10:42:55 [I|aud|5557a4ff] Host::Base (7611) create event on content_view_id 4
2020-10-05T10:42:55 [I|aud|5557a4ff] Host::Base (7611) create event on lifecycle_environment_id 9
2020-10-05T10:42:55 [I|aud|5557a4ff] Host::Base (7611) create event on kickstart_repository_id 
2020-10-05T10:42:55 [I|aud|5557a4ff] Host::Base (7611) create event on content_source_id 
2020-10-05T10:42:55 [I|aud|5557a4ff] Host::Base (7611) create event on installable_security_errata_count 0
2020-10-05T10:42:55 [I|aud|5557a4ff] Host::Base (7611) create event on installable_enhancement_errata_count 0
2020-10-05T10:42:55 [I|aud|5557a4ff] Host::Base (7611) create event on installable_bugfix_errata_count 0
2020-10-05T10:42:55 [I|aud|5557a4ff] Host::Base (7611) create event on applicable_rpm_count 0
2020-10-05T10:42:55 [I|aud|5557a4ff] Host::Base (7611) create event on upgradable_rpm_count 0
2020-10-05T10:42:55 [I|aud|5557a4ff] Host::Base (7611) create event on applicable_module_stream_count 0
2020-10-05T10:42:55 [I|aud|5557a4ff] Host::Base (7611) create event on upgradable_module_stream_count 0
2020-10-05T10:42:55 [I|app|5557a4ff] Remove puppet certificate for myhost.net
2020-10-05T10:42:56 [I|app|5557a4ff] Adding autosign entry for myhost.net
2020-10-05T10:42:56 [I|app|5557a4ff] Processed 2 tasks from queue 'Host::Managed Post', completed 2/2
2020-10-05T10:42:56 [I|app|5557a4ff]   Rendering api/v2/hosts/create.json.rabl
2020-10-05T10:42:56 [I|app|5557a4ff]   Rendered api/v2/hosts/create.json.rabl (207.8ms)
2020-10-05T10:42:56 [I|app|5557a4ff] Completed 201 Created in 149570ms (Views: 193.2ms | ActiveRecord: 225.1ms)

In the meantime the host created by subscription:

2020-10-05T10:42:28 [I|app|a374dcaf] Started POST "/rhsm/consumers?owner=myorg&activation_keys=production" for 10.238.10.4 at 2020-10-05 10:42:28 +0000
2020-10-05T10:42:28 [I|app|a374dcaf] Processing by Katello::Api::Rhsm::CandlepinProxiesController#consumer_activate as JSON
2020-10-05T10:42:28 [I|app|a374dcaf]   Parameters: {"name"=>"myhost.net", "contentTags"=>[], "serviceLevel"=>"", "usage"=>"", "role"=>"", "facts"=>"[FILTERED]", "addOns"=>[], "type"=>"system", "owner"=>"myorg", "activation_keys"=>"production"}
2020-10-05T10:42:34 [I|app|a374dcaf] Processed 1 tasks from queue 'Host::Managed Main', completed 1/1
2020-10-05T10:42:34 [I|aud|a374dcaf] Nic::Managed (9843) create event on mac 
2020-10-05T10:42:34 [I|aud|a374dcaf] Nic::Managed (9843) create event on ip 
2020-10-05T10:42:34 [I|aud|a374dcaf] Nic::Managed (9843) create event on type Nic::Managed
2020-10-05T10:42:34 [I|aud|a374dcaf] Nic::Managed (9843) create event on name myhost.net
2020-10-05T10:42:34 [I|aud|a374dcaf] Nic::Managed (9843) create event on host_id 7776
2020-10-05T10:42:34 [I|aud|a374dcaf] Nic::Managed (9843) create event on subnet_id 
2020-10-05T10:42:34 [I|aud|a374dcaf] Nic::Managed (9843) create event on domain_id 39
2020-10-05T10:42:34 [I|aud|a374dcaf] Nic::Managed (9843) create event on attrs {}
2020-10-05T10:42:34 [I|aud|a374dcaf] Nic::Managed (9843) create event on provider 
2020-10-05T10:42:34 [I|aud|a374dcaf] Nic::Managed (9843) create event on username 
2020-10-05T10:42:34 [I|aud|a374dcaf] Nic::Managed (9843) create event on password [redacted]
2020-10-05T10:42:34 [I|aud|a374dcaf] Nic::Managed (9843) create event on virtual false
2020-10-05T10:42:34 [I|aud|a374dcaf] Nic::Managed (9843) create event on link true
2020-10-05T10:42:34 [I|aud|a374dcaf] Nic::Managed (9843) create event on identifier 
2020-10-05T10:42:34 [I|aud|a374dcaf] Nic::Managed (9843) create event on tag 
2020-10-05T10:42:34 [I|aud|a374dcaf] Nic::Managed (9843) create event on attached_to 
2020-10-05T10:42:34 [I|aud|a374dcaf] Nic::Managed (9843) create event on managed true
2020-10-05T10:42:34 [I|aud|a374dcaf] Nic::Managed (9843) create event on mode balance-rr
2020-10-05T10:42:34 [I|aud|a374dcaf] Nic::Managed (9843) create event on attached_devices 
2020-10-05T10:42:34 [I|aud|a374dcaf] Nic::Managed (9843) create event on bond_options 
2020-10-05T10:42:34 [I|aud|a374dcaf] Nic::Managed (9843) create event on primary true
2020-10-05T10:42:34 [I|aud|a374dcaf] Nic::Managed (9843) create event on provision true
2020-10-05T10:42:34 [I|aud|a374dcaf] Nic::Managed (9843) create event on compute_attributes {}
2020-10-05T10:42:34 [I|aud|a374dcaf] Nic::Managed (9843) create event on ip6 
2020-10-05T10:42:34 [I|aud|a374dcaf] Nic::Managed (9843) create event on subnet6_id 
2020-10-05T10:42:34 [I|aud|a374dcaf] Nic::Managed (9843) create event on execution true
2020-10-05T10:42:34 [I|aud|a374dcaf] Host::Base (7776) create event on name myhost.net
2020-10-05T10:42:34 [I|aud|a374dcaf] Host::Base (7776) create event on root_pass [redacted]
2020-10-05T10:42:34 [I|aud|a374dcaf] Host::Base (7776) create event on architecture_id 
2020-10-05T10:42:34 [I|aud|a374dcaf] Host::Base (7776) create event on operatingsystem_id 
2020-10-05T10:42:34 [I|aud|a374dcaf] Host::Base (7776) create event on environment_id 
2020-10-05T10:42:34 [I|aud|a374dcaf] Host::Base (7776) create event on ptable_id 
2020-10-05T10:42:34 [I|aud|a374dcaf] Host::Base (7776) create event on medium_id 
2020-10-05T10:42:34 [I|aud|a374dcaf] Host::Base (7776) create event on build false
2020-10-05T10:42:34 [I|aud|a374dcaf] Host::Base (7776) create event on comment 
2020-10-05T10:42:34 [I|aud|a374dcaf] Host::Base (7776) create event on disk 
2020-10-05T10:42:34 [I|aud|a374dcaf] Host::Base (7776) create event on installed_at 
2020-10-05T10:42:34 [I|aud|a374dcaf] Host::Base (7776) create event on model_id 
2020-10-05T10:42:34 [I|aud|a374dcaf] Host::Base (7776) create event on hostgroup_id 
2020-10-05T10:42:34 [I|aud|a374dcaf] Host::Base (7776) create event on owner_id 1
2020-10-05T10:42:34 [I|aud|a374dcaf] Host::Base (7776) create event on owner_type User
2020-10-05T10:42:34 [I|aud|a374dcaf] Host::Base (7776) create event on enabled true
2020-10-05T10:42:34 [I|aud|a374dcaf] Host::Base (7776) create event on puppet_ca_proxy_id 
2020-10-05T10:42:34 [I|aud|a374dcaf] Host::Base (7776) create event on managed false
2020-10-05T10:42:34 [I|aud|a374dcaf] Host::Base (7776) create event on use_image 
2020-10-05T10:42:34 [I|aud|a374dcaf] Host::Base (7776) create event on image_file 
2020-10-05T10:42:34 [I|aud|a374dcaf] Host::Base (7776) create event on uuid 
2020-10-05T10:42:34 [I|aud|a374dcaf] Host::Base (7776) create event on compute_resource_id 
2020-10-05T10:42:34 [I|aud|a374dcaf] Host::Base (7776) create event on puppet_proxy_id 
2020-10-05T10:42:34 [I|aud|a374dcaf] Host::Base (7776) create event on certname 
2020-10-05T10:42:34 [I|aud|a374dcaf] Host::Base (7776) create event on image_id 
2020-10-05T10:42:34 [I|aud|a374dcaf] Host::Base (7776) create event on organization_id 3
2020-10-05T10:42:34 [I|aud|a374dcaf] Host::Base (7776) create event on location_id 7
2020-10-05T10:42:34 [I|aud|a374dcaf] Host::Base (7776) create event on otp 
2020-10-05T10:42:34 [I|aud|a374dcaf] Host::Base (7776) create event on realm_id 
2020-10-05T10:42:34 [I|aud|a374dcaf] Host::Base (7776) create event on compute_profile_id 
2020-10-05T10:42:34 [I|aud|a374dcaf] Host::Base (7776) create event on provision_method 
2020-10-05T10:42:34 [I|aud|a374dcaf] Host::Base (7776) create event on grub_pass [redacted]
2020-10-05T10:42:34 [I|aud|a374dcaf] Host::Base (7776) create event on pxe_loader 
2020-10-05T10:42:34 [I|aud|a374dcaf] Host::Base (7776) create event on openscap_proxy_id 
2020-10-05T10:42:34 [I|aud|a374dcaf] Host::Base (7776) create event on discovery_rule_id 
2020-10-05T10:42:34 [I|aud|a374dcaf] Host::Base (7776) create event on initiated_at 
2020-10-05T10:42:34 [I|aud|a374dcaf] Host::Base (7776) create event on build_errors 
2020-10-05T10:42:34 [I|aud|a374dcaf] Host::Base (7776) create event on ansible_role_ids []
2020-10-05T10:42:34 [I|aud|a374dcaf] Host::Base (7610) create event on host_id 7776
2020-10-05T10:42:34 [I|aud|a374dcaf] Host::Base (7610) create event on uuid [redacted]
2020-10-05T10:42:34 [I|aud|a374dcaf] Host::Base (7610) create event on content_view_id 4
2020-10-05T10:42:34 [I|aud|a374dcaf] Host::Base (7610) create event on lifecycle_environment_id 9
2020-10-05T10:42:34 [I|aud|a374dcaf] Host::Base (7610) create event on kickstart_repository_id 
2020-10-05T10:42:34 [I|aud|a374dcaf] Host::Base (7610) create event on content_source_id 
2020-10-05T10:42:34 [I|aud|a374dcaf] Host::Base (7610) create event on installable_security_errata_count 0
2020-10-05T10:42:34 [I|aud|a374dcaf] Host::Base (7610) create event on installable_enhancement_errata_count 0
2020-10-05T10:42:34 [I|aud|a374dcaf] Host::Base (7610) create event on installable_bugfix_errata_count 0
2020-10-05T10:42:34 [I|aud|a374dcaf] Host::Base (7610) create event on applicable_rpm_count 0
2020-10-05T10:42:34 [I|aud|a374dcaf] Host::Base (7610) create event on upgradable_rpm_count 0
2020-10-05T10:42:34 [I|aud|a374dcaf] Host::Base (7610) create event on applicable_module_stream_count 0
2020-10-05T10:42:34 [I|aud|a374dcaf] Host::Base (7610) create event on upgradable_module_stream_count 0
2020-10-05T10:42:34 [I|aud|a374dcaf] Host::Base (33633) create event on host_id 7776
2020-10-05T10:42:34 [I|aud|a374dcaf] Host::Base (33633) create event on uuid [redacted]
2020-10-05T10:42:34 [I|aud|a374dcaf] Host::Base (33633) create event on service_level 
2020-10-05T10:42:34 [I|aud|a374dcaf] Host::Base (33633) create event on release_version 
2020-10-05T10:42:34 [I|aud|a374dcaf] Host::Base (33633) create event on autoheal false
2020-10-05T10:42:34 [I|aud|a374dcaf] Host::Base (33633) create event on registered_at 2017-06-27 19:47:32 UTC
2020-10-05T10:42:34 [I|aud|a374dcaf] Host::Base (33633) create event on registered_through 
2020-10-05T10:42:34 [I|aud|a374dcaf] Host::Base (33633) create event on user_id 
2020-10-05T10:42:34 [I|aud|a374dcaf] Host::Base (33633) create event on hypervisor false
2020-10-05T10:42:34 [I|aud|a374dcaf] Host::Base (33633) create event on hypervisor_host_id 
2020-10-05T10:42:34 [I|aud|a374dcaf] Host::Base (33633) create event on purpose_usage 
2020-10-05T10:42:34 [I|aud|a374dcaf] Host::Base (33633) create event on purpose_role 
2020-10-05T10:42:34 [I|aud|a374dcaf] Host::Base (33633) create event on pool_ids []
2020-10-05T10:42:34 [I|aud|a374dcaf] Host::Base (7776) update event on grub_pass [redacted]
2020-10-05T10:42:48 [I|app|a374dcaf] Import facts for 'myhost.net' completed. Added: 172, Updated: 0, Deleted 0 facts
2020-10-05T10:42:48 [I|aud|a374dcaf] Host::Base (7776) update event on architecture_id , 1
2020-10-05T10:42:48 [I|aud|a374dcaf] Host::Base (7776) update event on operatingsystem_id , 43
2020-10-05T10:42:48 [I|aud|a374dcaf] Host::Base (7776) update event on model_id , 42
2020-10-05T10:42:49 [I|aud|a374dcaf] Host::Base (33633) update event on autoheal false, true
2020-10-05T10:42:49 [I|aud|a374dcaf] Host::Base (33633) update event on registered_at 2017-06-27 19:47:32 UTC, 2020-10-05 10:42:34 UTC
2020-10-05T10:42:49 [I|aud|a374dcaf] Host::Base (33633) update event on registered_through , myproxy.net
2020-10-05T10:42:49 [I|app|a374dcaf] Completed 200 OK in 21473ms (Views: 33.6ms | ActiveRecord: 1207.3ms)

Finally, when the host exits build mode:

2020-10-05T10:46:26 [I|app|a6c16c0f] Started GET "/unattended/built?token=fb08db65-799e-45f7-9a89-83a062aa81aa&url=http%3A%2F%2Fmyproxy.net%3A8000" for myproxy.net at 2020-10-05 10:46:26 +0000
2020-10-05T10:46:26 [I|app|a6c16c0f] Processing by UnattendedController#built as TEXT
2020-10-05T10:46:26 [I|app|a6c16c0f]   Parameters: {"token"=>"fb08db65-799e-45f7-9a89-83a062aa81aa", "url"=>"http://myproxy.net:8000", "unattended"=>{}}
2020-10-05T10:46:26 [I|app|a6c16c0f] unattended: myhost.net is built!
2020-10-05T10:46:27 [W|app|a6c16c0f] Not queueing Host::Managed: ["Name has already been taken"]
2020-10-05T10:46:27 [W|app|a6c16c0f] Not queueing Host::Managed: ["Name has already been taken"]
2020-10-05T10:46:27 [W|app|a6c16c0f] Not queueing Host::Managed: ["Name has already been taken"]
2020-10-05T10:46:27 [W|app|a6c16c0f] Not queueing Nic::Managed: ["Name has already been taken"]
2020-10-05T10:46:27 [W|app|a6c16c0f] Not queueing Nic::Managed: ["Name has already been taken"]
2020-10-05T10:46:27 [W|app|a6c16c0f] Failed to set Build on myhost.net: ["Name has already been taken"]
2020-10-05T10:46:27 [I|app|a6c16c0f] Completed 409 Conflict in 672ms (ActiveRecord: 34.7ms)

Hey, I know this is a bit old, but curious if you ever reached a resolution to this

Nope, I used workarounds in provisioning templates… wait for NSG, wait for data disk, wait again… then register :confused: