There are problems with Nova launching instantces due to permissions
with nova being able to read/write certain directories on the NFS. The
permissions are right on the NFS and the folders the NFS mounts to, but
there still seems to be issues. The cause may be using a directory under
/root as the NFS mount. This patch moves the NFS mounts to be individual
folders under /. The patch also restart nova_compute docker container as
NFS problems still persist unless this is done.
JIRA: APEX-654
Change-Id: I25eee98c1a6516dfa44c686c2e614f6dc7000d98
Signed-off-by: Tim Rozet <trozet@redhat.com>
utils.run_ansible(ansible_args,
os.path.join(args.lib_dir, constants.ANSIBLE_PATH,
'deploy_dependencies.yml'))
utils.run_ansible(ansible_args,
os.path.join(args.lib_dir, constants.ANSIBLE_PATH,
'deploy_dependencies.yml'))
+ all_in_one = not bool(args.virt_compute_nodes)
if args.snapshot:
# Start snapshot Deployment
logging.info('Executing Snapshot Deployment...')
SnapshotDeployment(deploy_settings=deploy_settings,
snap_cache_dir=args.snap_cache,
fetch=not args.no_fetch,
if args.snapshot:
# Start snapshot Deployment
logging.info('Executing Snapshot Deployment...')
SnapshotDeployment(deploy_settings=deploy_settings,
snap_cache_dir=args.snap_cache,
fetch=not args.no_fetch,
- all_in_one=not bool(args.virt_compute_nodes))
else:
# Start Standard TripleO Deployment
deployment = ApexDeployment(deploy_settings, args.patches_file,
else:
# Start Standard TripleO Deployment
deployment = ApexDeployment(deploy_settings, args.patches_file,
deploy_vars['l2gw'] = ds_opts.get('l2gw')
deploy_vars['sriov'] = ds_opts.get('sriov')
deploy_vars['tacker'] = ds_opts.get('tacker')
deploy_vars['l2gw'] = ds_opts.get('l2gw')
deploy_vars['sriov'] = ds_opts.get('sriov')
deploy_vars['tacker'] = ds_opts.get('tacker')
+ deploy_vars['all_in_one'] = all_in_one
# TODO(trozet): pull all logs and store in tmp dir in overcloud
# playbook
post_overcloud = os.path.join(args.lib_dir, constants.ANSIBLE_PATH,
# TODO(trozet): pull all logs and store in tmp dir in overcloud
# playbook
post_overcloud = os.path.join(args.lib_dir, constants.ANSIBLE_PATH,
{con.VIRT_RUN_CMD: "ln -s /usr/lib/systemd/system/nfs-server.service "
"/etc/systemd/system/multi-user.target.wants/"
"nfs-server.service"},
{con.VIRT_RUN_CMD: "ln -s /usr/lib/systemd/system/nfs-server.service "
"/etc/systemd/system/multi-user.target.wants/"
"nfs-server.service"},
- {con.VIRT_RUN_CMD: "mkdir -p /root/nfs/glance"},
- {con.VIRT_RUN_CMD: "mkdir -p /root/nfs/cinder"},
- {con.VIRT_RUN_CMD: "mkdir -p /root/nfs/nova"},
- {con.VIRT_RUN_CMD: "chmod 777 /root/nfs/glance"},
- {con.VIRT_RUN_CMD: "chmod 777 /root/nfs/cinder"},
- {con.VIRT_RUN_CMD: "chmod 777 /root/nfs/nova"},
- {con.VIRT_RUN_CMD: "echo '/root/nfs/glance *(rw,sync,"
+ {con.VIRT_RUN_CMD: "mkdir -p /glance"},
+ {con.VIRT_RUN_CMD: "mkdir -p /cinder"},
+ {con.VIRT_RUN_CMD: "mkdir -p /nova"},
+ {con.VIRT_RUN_CMD: "chmod 777 /glance"},
+ {con.VIRT_RUN_CMD: "chmod 777 /cinder"},
+ {con.VIRT_RUN_CMD: "chmod 777 /nova"},
+ {con.VIRT_RUN_CMD: "echo '/glance *(rw,sync,"
"no_root_squash,no_acl)' > /etc/exports"},
"no_root_squash,no_acl)' > /etc/exports"},
- {con.VIRT_RUN_CMD: "echo '/root/nfs/cinder *(rw,sync,"
+ {con.VIRT_RUN_CMD: "echo '/cinder *(rw,sync,"
"no_root_squash,no_acl)' >> /etc/exports"},
"no_root_squash,no_acl)' >> /etc/exports"},
- {con.VIRT_RUN_CMD: "echo '/root/nfs/nova *(rw,sync,"
+ {con.VIRT_RUN_CMD: "echo '/nova *(rw,sync,"
"no_root_squash,no_acl)' >> /etc/exports"},
{con.VIRT_RUN_CMD: "exportfs -avr"},
])
"no_root_squash,no_acl)' >> /etc/exports"},
{con.VIRT_RUN_CMD: "exportfs -avr"},
])
'139 allow NFS':
dport: 2049
GlanceNfsEnabled: true
'139 allow NFS':
dport: 2049
GlanceNfsEnabled: true
- GlanceNfsShare: overcloud-controller-0.opnfvlf.org:/root/nfs/glance
+ GlanceNfsShare: overcloud-controller-0.opnfvlf.org:/glance
GlanceNfsOptions:
'rw,sync,nosharecache,context=system_u:object_r:glance_var_lib_t:s0'
NovaNfsEnabled: true
GlanceNfsOptions:
'rw,sync,nosharecache,context=system_u:object_r:glance_var_lib_t:s0'
NovaNfsEnabled: true
- NovaNfsShare: overcloud-controller-0.opnfvlf.org:/root/nfs/nova
+ NovaNfsShare: overcloud-controller-0.opnfvlf.org:/nova
NovaNfsOptions: 'rw,sync,nosharecache,context=system_u:object_r:nfs_t:s0'
DockerPuppetProcessCount: 10
NeutronNetworkVLANRanges: 'datacentre:500:525'
NovaNfsOptions: 'rw,sync,nosharecache,context=system_u:object_r:nfs_t:s0'
DockerPuppetProcessCount: 10
NeutronNetworkVLANRanges: 'datacentre:500:525'
'139 allow NFS':
dport: 2049
GlanceNfsEnabled: true
'139 allow NFS':
dport: 2049
GlanceNfsEnabled: true
- GlanceNfsShare: overcloud-controller-0.opnfvlf.org:/root/nfs/glance
+ GlanceNfsShare: overcloud-controller-0.opnfvlf.org:/glance
GlanceNfsOptions:
'rw,sync,nosharecache,context=system_u:object_r:glance_var_lib_t:s0'
NovaNfsEnabled: true
GlanceNfsOptions:
'rw,sync,nosharecache,context=system_u:object_r:glance_var_lib_t:s0'
NovaNfsEnabled: true
- NovaNfsShare: overcloud-controller-0.opnfvlf.org:/root/nfs/nova
+ NovaNfsShare: overcloud-controller-0.opnfvlf.org:/nova
NovaNfsOptions: 'rw,sync,nosharecache,context=system_u:object_r:nfs_t:s0'
DockerPuppetProcessCount: 10
NeutronNetworkVLANRanges: 'datacentre:500:525'
NovaNfsOptions: 'rw,sync,nosharecache,context=system_u:object_r:nfs_t:s0'
DockerPuppetProcessCount: 10
NeutronNetworkVLANRanges: 'datacentre:500:525'
'139 allow NFS':
dport: 2049
GlanceNfsEnabled: true
'139 allow NFS':
dport: 2049
GlanceNfsEnabled: true
- GlanceNfsShare: overcloud-controller-0.opnfvlf.org:/root/nfs/glance
+ GlanceNfsShare: overcloud-controller-0.opnfvlf.org:/glance
GlanceNfsOptions:
'rw,sync,nosharecache,context=system_u:object_r:glance_var_lib_t:s0'
NovaNfsEnabled: true
GlanceNfsOptions:
'rw,sync,nosharecache,context=system_u:object_r:glance_var_lib_t:s0'
NovaNfsEnabled: true
- NovaNfsShare: overcloud-controller-0.opnfvlf.org:/root/nfs/nova
+ NovaNfsShare: overcloud-controller-0.opnfvlf.org:/nova
NovaNfsOptions: 'rw,sync,nosharecache,context=system_u:object_r:nfs_t:s0'
DockerPuppetProcessCount: 10
NeutronNetworkVLANRanges: 'datacentre:500:525'
NovaNfsOptions: 'rw,sync,nosharecache,context=system_u:object_r:nfs_t:s0'
DockerPuppetProcessCount: 10
NeutronNetworkVLANRanges: 'datacentre:500:525'
- openstack-nova-api
- openstack-nova-scheduler
- openstack-nova-conductor
- openstack-nova-api
- openstack-nova-scheduler
- openstack-nova-conductor
- - name: Restart Compute Nova Compute (Pike Workaround)
- shell: "systemctl restart openstack-nova-compute"
+ - name: Restart Compute Nova Compute (workaround for NFS)
+ shell: "docker restart nova_compute"
- when:
- - "'compute' in ansible_hostname"
- - os_version == 'pike'
+ when: "'compute' in ansible_hostname or all_in_one"
- name: Update ODL container restart policy to always
shell: "docker update --restart=always opendaylight_api"
become: yes
- name: Update ODL container restart policy to always
shell: "docker update --restart=always opendaylight_api"
become: yes