Hi Marc,

With reference to setting custom host name to instances, I see a problem.
I set Server Hostname Format as: 
{SCALR_FARM_NAME}-{SCALR_FARM_ROLE_ALIAS}-{SCALR_INSTANCE_INDEX}
When a VM instance gets created, instance name & hostname are set properly 
as expected. But, DNS resolution fails inside the VM:

[root@DevOps-InternalInfrastructureServices-New-Host-1 ~]# hostname

DevOps-InternalInfrastructureServices-New-Host-1

[root@DevOps-InternalInfrastructureServices-New-Host-1 ~]# hostname -f

*hostname: Name or service not known*

[root@DevOps-InternalInfrastructureServices-New-Host-1 ~]# cat /etc/hosts

None    DevOps-InternalInfrastructureServices-New-Host-1
127.0.0.1 localhost

Looking at the log, it appears like DNS entries are getting created for 
default hostname (instead of custom host name):

2016-07-20 10:55:07,313 - helpers.py[DEBUG]: Running config-set_hostname 
using lock (<FileLock using file 
'/var/lib/cloud/instances/i-3bb093bd/sem/config_set_hostname'>)

2016-07-20 10:55:07,317 - cc_set_hostname.py[DEBUG]: Setting the hostname 
to ip-100-122-203-40.us-east-1.ec2.aws.net (ip-100-122-203-40)

2016-07-20 10:55:07,317 - util.py[DEBUG]: *Running command ['hostnamectl', 
'set-hostname', 'ip-100-122-203-40.us-east-1.ec2.aws.net']* with allowed 
return codes [0] (shell=False, capture=True)

2016-07-20 10:55:07,886 - __init__.py[DEBUG]: Non-persistently setting the 
system hostname to ip-100-122-203-40

2016-07-20 10:55:07,886 - util.py[DEBUG]: Running command ['hostname', 
'ip-100-122-203-40'] with allowed return codes [0] (shell=False, 
capture=True)

2016-07-20 10:55:07,893 - helpers.py[DEBUG]: Running 
config-update_etc_hosts using lock (<cloudinit.helpers.DummyLock object at 
0x190a910>)

2016-07-20 10:55:07,895 - util.py[DEBUG]: Reading from 
/etc/cloud/templates/hosts.redhat.tmpl (quiet=False)

2016-07-20 10:55:07,897 - util.py[DEBUG]: Read 20 bytes from 
/etc/cloud/templates/hosts.redhat.tmpl
2016-07-20 10:55:07,899 - util.py[DEBUG]: Writing to /etc/hosts - wb: [420] 
20 bytes

Am i missing any configuration ??

Appreciate your help !!

-- 
You received this message because you are subscribed to the Google Groups 
"scalr-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to