Skip to content

Commit

Permalink
Ceph: workloads adoption with cinder volume
Browse files Browse the repository at this point in the history
Signed-off-by: Bohdan Dobrelia <[email protected]>
  • Loading branch information
bogdando committed Feb 8, 2024
1 parent ad0dabc commit 3187e71
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 17 deletions.
3 changes: 2 additions & 1 deletion docs_dev/assemblies/development_environment.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,8 @@ Confirm the image UUID can be seen in Ceph's images pool.

[,bash]
----
ssh -i ~/install_yamls/out/edpm/ansibleee-ssh-key-id_rsa [email protected] sudo cephadm shell -- rbd -p images ls -l
CONTROLLER1_SSH="ssh -i ~/install_yamls/out/edpm/ansibleee-ssh-key-id_rsa [email protected]"
$CONTROLLER1_SSH sudo cephadm shell -- rbd -p images ls -l
----

Create a Cinder volume, a backup from it, and snapshot it.
Expand Down
18 changes: 2 additions & 16 deletions tests/roles/development_environment/files/pre_launch.bash
Original file line number Diff line number Diff line change
Expand Up @@ -47,20 +47,6 @@ ${BASH_ALIASES[openstack]} security group rule list --protocol tcp --ingress -f
${BASH_ALIASES[openstack]} security group rule create --protocol tcp --ingress --dst-port 22 $(${BASH_ALIASES[openstack]} security group list --project admin -f value -c ID)

# check connectivity via FIP
export FIP=192.168.122.20
# FIXME: defer __network_adoption__ - this doesn't work yet in the adoption procedure
#ping -c4 192.168.122.20

# FIXME: Invalid volume: Volume xxx status must be available, but current status is: backing-up
# Create a Cinder volume, a backup from it, and snapshot it.
#${BASH_ALIASES[openstack]} volume show disk || \
# ${BASH_ALIASES[openstack]} volume create --image cirros --bootable --size 1 disk
#${BASH_ALIASES[openstack]} volume backup show backup || \
# ${BASH_ALIASES[openstack]} volume backup create --name backup disk
#${BASH_ALIASES[openstack]} volume snapshot show snapshot || \
# ${BASH_ALIASES[openstack]} volume snapshot create --volume disk snapshot

# TODO: Add volume to the test VM, after tripleo wallaby (osp 17) isolnet network adoption implemented for storage networks
#${BASH_ALIASES[openstack]} volume show disk -f json | jq -r '.status' | grep -q available && \
# ${BASH_ALIASES[openstack]} server add volume test disk

export FIP=192.168.122.20
#ping -c4 $FIP
23 changes: 23 additions & 0 deletions tests/roles/development_environment/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,28 @@
when: prelaunch_test_instance|bool
ansible.builtin.shell:
cmd: |
{{ shell_header }}
alias openstack="ssh -i {{ edpm_privatekey_path }} root@{{ edpm_node_ip }} OS_CLOUD=standalone openstack"
{{ lookup('ansible.builtin.file', 'pre_launch.bash') }}
# Ceph Storage Steps
# FIXME(bogdando): fix race for volume status must be available, instead of backing-up, before snapshotting it
# TODO(bogdando): test volume attach after isolnet network adoption implemented for storage networks
# Confirm the image UUID can be seen in Ceph's images pool
CONTROLLER1_SSH={{ controller1_ssh }}
$CONTROLLER1_SSH sudo cephadm shell -- rbd -p images ls -l
# Create a Cinder volume, a backup from it, and snapshot it
${BASH_ALIASES[openstack]} volume show disk ||\
${BASH_ALIASES[openstack]} volume create --image cirros --bootable --size 1 disk
${BASH_ALIASES[openstack]} volume backup show backup ||\
${BASH_ALIASES[openstack]} volume backup create --name backup disk
${BASH_ALIASES[openstack]} volume snapshot show snapshot ||\
${BASH_ALIASES[openstack]} volume snapshot create --volume disk snapshot
# Add volume to the test VM
${BASH_ALIASES[openstack]} volume show disk -f json | jq -r '.status' | grep -q available && \
${BASH_ALIASES[openstack]} server add volume test disk

0 comments on commit 3187e71

Please sign in to comment.