From 2957ee6912f1c7a2cb71da7ece878bd2b188e5c9 Mon Sep 17 00:00:00 2001 From: Tim Rozet Date: Fri, 14 Dec 2018 12:59:09 -0500 Subject: Fix NFS issues with Nova 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 (cherry picked from commit 32b3b5dd6290ae5c33edee2860a3edd9f3044d43) --- apex/deploy.py | 4 +++- apex/overcloud/deploy.py | 15 +++++++++------ 2 files changed, 12 insertions(+), 7 deletions(-) (limited to 'apex') diff --git a/apex/deploy.py b/apex/deploy.py index fa468457..32022d6a 100644 --- a/apex/deploy.py +++ b/apex/deploy.py @@ -320,13 +320,14 @@ def main(): 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, - all_in_one=not bool(args.virt_compute_nodes)) + all_in_one=all_in_one) else: # Start Standard TripleO Deployment deployment = ApexDeployment(deploy_settings, args.patches_file, @@ -687,6 +688,7 @@ def main(): 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, diff --git a/apex/overcloud/deploy.py b/apex/overcloud/deploy.py index e8547d89..39d26c8a 100644 --- a/apex/overcloud/deploy.py +++ b/apex/overcloud/deploy.py @@ -440,14 +440,17 @@ def prep_image(ds, ns, img, tmp_dir, root_pw=None, docker_tag=None, {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: "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"}, - {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"}, - {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"}, ]) -- cgit 1.2.3-korg