IBM / ubiquity

Ubiquity
Apache License 2.0
90 stars 26 forks source link

Merge dev to scbe and align scbe backend with the new attach\detach request objects #51

Closed shay-berman closed 6 years ago

shay-berman commented 7 years ago

Almaden team finished the refactoring of the attach\detach request objects #43 (and its in dev and master branchs) so now we can merge it to scbe branch and align scbe backend with the new approach.

shay-berman commented 7 years ago

Finished to merge and adjust the code per #43 interfaces refactoring. After merge all unit tests passed and I manually run the acceptance tests on IBM FlashSystem A9000 which passed OK. I opened up a PR #52 to merge it to Dev branch.

Note : on Sunday we will continue to verify the issue I encounter after merge commits 26dea85 , 63314bf.

Here is the output of the acceptance test :

[root@docker-c1-n1 tmp]# ./run_acceptance_ibm_block_storage_via_scbe.sh Start Acceptance Test - Run stateful container on IBM FlashSystem A9000 ####### ---> 0. Verify that no volume attached to the docker node Filesystem 1K-blocks Used Available Use% Mounted on NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT DRIVER VOLUME NAME ####### ---> 1. Create volume on SCBE gold service (which is on IBM FlashSystem A9000R) myVol1 ####### ---> 1.1. Verify volume info DRIVER VOLUME NAME ubiquity myVol1 [ { "Driver": "ubiquity", "Labels": {}, "Mountpoint": "/", "Name": "myVol1", "Options": { "profile": "gold", "size": "5" }, "Scope": "local" } ]

---> 1.2. Verify storage side : verify the volume was created on the relevant pool\service

####### ---> 2. Run myContainer1 with the new volume 81b55d2e8f724b6ee0e36fd15a2cfd5ee52ba9adcb411129e2fd9c36b4a13511

---> 2.1. Verify the volume was attached to the docker node

Filesystem 1K-blocks Used Available Use% Mounted on /dev/mapper/mpathbj 4675068 19096 4395448 1% /ubiquity/6001738CFC9035EB0000000000CBA7C2 mpathbj (36001738cfc9035eb0000000000cba7c2) dm-8 IBM ,2810XIV
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT

sdb 8:16 0 4.7G 0 disk
└─mpathbj 253:8 0 4.7G 0 mpath /ubiquity/6001738CFC9035EB0000000000CBA7C2 sdc 8:32 0 4.7G 0 disk
└─mpathbj 253:8 0 4.7G 0 mpath /ubiquity/6001738CFC9035EB0000000000CBA7C2 /dev/mapper/mpathbj on /ubiquity/6001738CFC9035EB0000000000CBA7C2 type ext4 (rw,relatime,seclabel,data=ordered)

---> 2.2. Verify volume exist inside the container

Filesystem 1K-blocks Used Available Use% Mounted on /dev/mapper/mpathbj 4675068 19096 4395448 0% /data

---> 2.3. Verify container up and with the mount point

81b55d2e8f72 alpine "/bin/sh" 6 seconds ago Up Less than a second myContainer1 [myVol1:/data] [{volume myVol1 /ubiquity/6001738CFC9035EB0000000000CBA7C2 /data ubiquity true }]

---> 2.3. Verity the storage side : check volume has mapping to the host

####### ---> 3. Write DATA on the volume by create a file in /data inside the container -rw-r--r-- 1 root root 0 Jun 22 22:36 /data/file_on_A9000_volume ####### ---> 4. Stop the container myContainer1

---> 4.1. Verify the volume was detached from the docker node

Filesystem 1K-blocks Used Available Use% Mounted on NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT

---> 4.2. Verify container stoped but volume still exist

DRIVER VOLUME NAME ubiquity myVol1

---> 4.3. Verity the storage side : check volume is no longer mapped to the hos

####### ---> 5. Run another container(myContainer2) with the same volume and check the if the data remains 723f8f3f2321c04d0817733439148a06707282a2e0aa162b1b16e6f4b21e9445

---> 5.1. Verify that the data remains (file exist on the /data inside the container)

-rw-r--r-- 1 root root 0 Jun 22 22:36 /data/file_on_A9000_volume ####### ---> 6. Stop the container (of cause will detach the volume from the host) myContainer2 myContainer1 myContainer2 ####### ---> 7. Remove the volume myVol1 DRIVER VOLUME NAME

---> 7.1. Verity the storage side : check volume is no longer exist

####### ---> 8. Run container without creating vol in advance f8731c80e67d0c67e00161d2b589f379812ac597000ff3499d59748345df3975

---> 8.1. Verify volume was created for this container and you can touch a file inside the container

ubiquity myVol1 -rw-r--r-- 1 root root 0 Jun 22 22:37 /data/file_on_A9000_volume

---> 8.2. Verify that you stop the container and start the same container so the file still exist

myContainer3 myContainer3 -rw-r--r-- 1 root root 0 Jun 22 22:37 /data/file_on_A9000_volume

---> 8.3 Stop the container and remove the volume

myContainer3 myContainer3 myVol1 DRIVER VOLUME NAME

====================================================== Successfully Finish The Acceptance test ([8] steps). Running stateful container on IBM Block Storage.