Comment 15 for bug 1901570

Revision history for this message
David Coronel (davecore) wrote :

I was able to mount a share by redeploying with only 1 unit of manila and 1 unit of ganesha. I also added a missing policy routing relation and recreated the share type. I'm not sure which one of these things allowed me to mount the share inside the VM:

# Built charm with Dmitrii's fix
git clone https://github.com/openstack/charm-manila-ganesha charm-manila-ganesha-with-dmitrii
cd charm-manila-ganesha-with-dmitrii
git fetch https://review.opendev.org/openstack/charm-manila-ganesha refs/changes/12/743212/11
git checkout FETCH_HEAD
tox -e build

# Deploy charms with only 1 unit of Manila and Ganesha

juju deploy /home/ubuntu/preprod/config/charms/manila-ganesha-with-dmitrii --bind "internal-space admin=internal-space ceph=ceph-access-space cluster=internal-space ha=oam-space public=public-space tenant-storage=public-space" \
--config worker-multiplier=0.25 \
--config openstack-origin="cloud:bionic-train" \
--config use-internal-endpoints=True \
--config vip="172.31.248.29 172.31.246.33" \
--config os-admin-hostname="ganesha1-i.<domain name>.com" \
--config os-internal-hostname="ganesha1-i.<domain name>.com" \
--config os-public-hostname="ganesha1.<domain name>.com" -n 1 --to lxd:11 \
manila-ganesha

juju deploy cs:manila --bind "internal-space admin=internal-space cluster=internal-space ha=oam-space public=public-space" \
--config worker-multiplier=0.25 \
--config openstack-origin="cloud:bionic-train" \
--config region=<region name> \
--config vip="172.31.248.28 172.31.246.32" \
--config default-share-backend=cephfsnfs1 \
--config share-protocols=NFS \
--config use-internal-endpoints=True \
--config ssl_ca="$(base64 /home/ubuntu/preprod/secrets/certs/cacert.pem)" \
--config ssl_cert="$(base64 /home/ubuntu/preprod/secrets/certs/<domain name>.crt)" \
--config ssl_key="$(base64 /home/ubuntu/preprod/secrets/certs/<domain name>.key)" \
--config os-admin-hostname=manila-i.<domain name>.com \
--config os-internal-hostname=manila-i.<domain name>.com \
--config os-public-hostname=manila.<domain name>.com -n 1 --to lxd:0 \
manila

juju add-relation ceph-mon-az1:client manila-ganesha:ceph
juju add-relation manila-ganesha:shared-db mysql:shared-db
juju add-relation manila-ganesha:amqp rabbitmq-server:amqp
juju add-relation manila-ganesha:identity-service keystone:identity-credentials
juju add-relation manila:remote-manila-plugin manila-ganesha:manila-plugin
juju add-relation manila:amqp rabbitmq-server:amqp
juju add-relation manila:identity-service keystone:identity-service
juju add-relation manila:shared-db mysql:shared-db

juju deploy cs:hacluster --bind "internal-space" --config cluster_count=1 hacluster-manila
juju deploy cs:hacluster --bind "internal-space" --config cluster_count=1 hacluster-ganesha

juju add-relation manila:ha hacluster-manila:ha
juju add-relation manila-ganesha:ha hacluster-ganesha:ha

# Create type
manila type-create cephfsnfstype false
manila type-key cephfsnfstype set vendor_name=Ceph storage_protocol=NFS

# Create share
manila create --share-type cephfsnfstype --name cephnfsshare1 nfs 1

# Give access to VM floating IP
manila access-allow cephnfsshare1 ip 172.10.10.17 --access-level rw

# Add relation between manila-ganesha and public-policy-routing
juju add-relation manila-ganesha public-policy-routing

# Mount the share inside the VM
ubuntu@myVM:~$ sudo mount -t nfs 172.31.248.29:/volumes/_nogroup/3c82db68-25cd-4e83-86f2-2d8d35313c97 /mnt/
ubuntu@myVM:~$ df -h
Filesystem Size Used Avail Use% Mounted on
udev 985M 0 985M 0% /dev
tmpfs 200M 664K 199M 1% /run
/dev/vda1 2.0G 1.7G 318M 85% /
tmpfs 997M 0 997M 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 997M 0 997M 0% /sys/fs/cgroup
/dev/vda15 105M 3.6M 101M 4% /boot/efi
tmpfs 200M 0 200M 0% /run/user/1000
172.31.248.29:/volumes/_nogroup/3c82db68-25cd-4e83-86f2-2d8d35313c97 1.0G 0 1.0G 0% /mnt

ubuntu@myVM:~$ sudo touch /mnt/allo
ubuntu@myVM:~$ sudo touch /mnt/allo2
ubuntu@myVM:~$ ls -l /mnt
total 0
-rw-r--r-- 1 nobody 4294967294 0 Nov 13 19:39 allo
-rw-r--r-- 1 nobody 4294967294 0 Nov 13 19:39 allo2