A couple of hot fixes for fuel-agent
1) Fix cloud-init meta-data templates Just meta-data comments layout. 2) Fix repos handling in nailgun drivers Remove quotes from urls since apt refuses to work with them. 3) Fix ntp.conf issue Wrong semaphore ids in boothook were wrong Closes-Bug: #1388042 Implements: blueprint image-based-provisioning Change-Id: Iad6755753cc1fa938b370016cd2f4026e76b90a3
This commit is contained in:
parent
3c9c8b0f6b
commit
82c976b46d
@ -74,9 +74,9 @@ cloud-init-per instance sync_hwclock hwclock --systohc
|
||||
cloud-init-per instance edit_ntp_conf1 sed -i '/^\s*tinker panic/ d' /etc/ntp.conf
|
||||
cloud-init-per instance edit_ntp_conf2 sed -i '1 i tinker panic 0' /etc/ntp.conf
|
||||
cloud-init-per instance edit_ntp_conf3 echo 0 > /var/lib/ntp/drift
|
||||
cloud-init-per instance edit_ntp_conf_0 chown ntp: /var/lib/ntp/drift
|
||||
cloud-init-per instance edit_ntp_conf3 sed -i '/^\s*server/ d' /etc/ntp.conf
|
||||
cloud-init-per instance edit_ntp_conf4 echo "server {{ common.master_ip }} burst iburst" | tee -a /etc/ntp.conf
|
||||
cloud-init-per instance edit_ntp_conf4 chown ntp: /var/lib/ntp/drift
|
||||
cloud-init-per instance edit_ntp_conf5 sed -i '/^\s*server/ d' /etc/ntp.conf
|
||||
cloud-init-per instance edit_ntp_conf6 echo "server {{ common.master_ip }} burst iburst" | tee -a /etc/ntp.conf
|
||||
|
||||
|
||||
# Point installed ntpd to Master node
|
||||
|
@ -10,6 +10,8 @@ function add_str_to_file_if_not_exists {
|
||||
fi
|
||||
}
|
||||
|
||||
cloud-init-per instance wipe_sources_list_templates echo | tee /etc/cloud/templates/sources.list.ubuntu.tmpl
|
||||
|
||||
# configure udev rules
|
||||
|
||||
# udev persistent net
|
||||
@ -57,8 +59,8 @@ cloud-init-per instance sync_hwclock hwclock --systohc
|
||||
cloud-init-per instance edit_ntp_conf1 sed -i '/^\s*tinker panic/ d' /etc/ntp.conf
|
||||
cloud-init-per instance edit_ntp_conf2 sed -i '1 i tinker panic 0' /etc/ntp.conf
|
||||
cloud-init-per instance edit_ntp_conf3 echo 0 > /var/lib/ntp/drift
|
||||
cloud-init-per instance edit_ntp_conf3 sed -i '/^\s*server/ d' /etc/ntp.conf
|
||||
cloud-init-per instance edit_ntp_conf4 echo "server {{ common.master_ip }} burst iburst" | tee -a /etc/ntp.conf
|
||||
cloud-init-per instance edit_ntp_conf4 sed -i '/^\s*server/ d' /etc/ntp.conf
|
||||
cloud-init-per instance edit_ntp_conf5 echo "server {{ common.master_ip }} burst iburst" | tee -a /etc/ntp.conf
|
||||
|
||||
cloud-init-per instance removeUseDNS sed -i --follow-symlinks -e '/UseDNS/d' /etc/ssh/sshd_config
|
||||
add_str_to_file_if_not_exists /etc/ssh/sshd_config 'UseDNS' 'UseDNS no'
|
||||
|
@ -1,11 +1,14 @@
|
||||
#cloud-config
|
||||
resize_rootfs: false
|
||||
growpart:
|
||||
mode: false
|
||||
disable_ec2_metadata: true
|
||||
disable_root: false
|
||||
|
||||
# password: RANDOM
|
||||
# chpasswd: { expire: True }
|
||||
|
||||
ssh_pwauth: True
|
||||
ssh_pwauth: true
|
||||
ssh_authorized_keys:
|
||||
{% for key in common.ssh_auth_keys %}
|
||||
- {{ key }}
|
||||
|
@ -1,8 +1,13 @@
|
||||
#cloud-config
|
||||
resize_rootfs: false
|
||||
growpart:
|
||||
mode: false
|
||||
disable_ec2_metadata: true
|
||||
disable_root: false
|
||||
|
||||
ssh_pwauth: True
|
||||
user: root
|
||||
password: r00tme
|
||||
chpasswd: { expire: false }
|
||||
ssh_pwauth: true
|
||||
ssh_authorized_keys:
|
||||
{% for key in common.ssh_auth_keys %}
|
||||
- {{ key }}
|
||||
|
@ -1,10 +1,11 @@
|
||||
# instance-id will be autogenerated
|
||||
# instance-id: iid-abcdefg
|
||||
network-interfaces: |
|
||||
auto {{ common.admin_iface_name|default("eth0") }}
|
||||
iface {{ common.admin_iface_name|default("eth0") }} inet static
|
||||
address {{ common.admin_ip }}
|
||||
# network 192.168.1.0
|
||||
# network 192.168.1.0
|
||||
netmask {{ common.admin_mask }}
|
||||
# broadcast 192.168.1.255
|
||||
# gateway 192.168.1.254
|
||||
# broadcast 192.168.1.255
|
||||
# gateway 192.168.1.254
|
||||
hostname: {{ common.hostname }}
|
||||
|
@ -1,10 +1,11 @@
|
||||
# instance-id will be autogenerated
|
||||
# instance-id: iid-abcdefg
|
||||
network-interfaces: |
|
||||
auto {{ common.admin_iface_name|default("eth0") }}
|
||||
iface {{ common.admin_iface_name|default("eth0") }} inet static
|
||||
address {{ common.admin_ip }}
|
||||
# network 192.168.1.0
|
||||
# network 192.168.1.0
|
||||
netmask {{ common.admin_mask }}
|
||||
# broadcast 192.168.1.255
|
||||
# gateway 192.168.1.254
|
||||
# broadcast 192.168.1.255
|
||||
# gateway 192.168.1.254
|
||||
hostname: {{ common.hostname }}
|
||||
|
@ -321,7 +321,8 @@ class Nailgun(object):
|
||||
admin_mask=admin_interface['netmask'],
|
||||
admin_iface_name=admin_interface['name'],
|
||||
timezone=data['ks_meta'].get('timezone', 'America/Los_Angeles'),
|
||||
ks_repos=dict(item.split('=') for item in
|
||||
ks_repos=dict(map(lambda x: x.strip('"').strip("'"),
|
||||
item.split('=')) for item in
|
||||
data['ks_meta']['repo_metadata'].split(','))
|
||||
)
|
||||
|
||||
|
@ -106,7 +106,7 @@ PROVISION_SAMPLE_DATA = {
|
||||
"mco_auto_setup": 1,
|
||||
"auth_key": "fake_auth_key",
|
||||
"authorized_keys": ["fake_authorized_key1", "fake_authorized_key2"],
|
||||
"repo_metadata": "repo1=repo1_url,repo2=repo2_url",
|
||||
"repo_metadata": 'repo1="repo1_url",' + "repo2='repo2_url'",
|
||||
"pm_data": {
|
||||
"kernel_params": "console=ttyS0,9600 console=tty0 rootdelay=90 "
|
||||
"nomodeset",
|
||||
|
Loading…
Reference in New Issue
Block a user