Skip to content
Snippets Groups Projects
Commit ea03489b authored by Jan Kryštof's avatar Jan Kryštof
Browse files

Merge branch 'feat/security_incidents_minor_chnages' into 'master'

Feat/security incidents minor chnages

See merge request !8
parents aa2c87f3 77c80068
No related branches found
No related tags found
1 merge request!8Feat/security incidents minor chnages
......@@ -10,6 +10,7 @@ The MetaCentrum Security team detects suspicious VM and creates ticket in the RT
- provide identity of the VM owner
- share snapshot of the VM
- instruction how to address the VM further (stop, keep, etc)
- in case of stopping, include locking the VM: `SERVER_ID=... openstack server stop $SERVER_ID &&openstack server lock $SERVER_ID`
MetaCentrum Security handles communication with the user - owner of the Openstack project where the VM originates from.
......
......@@ -11,9 +11,6 @@ VOLUME_TRANSFER_DETAILS=$(cat "$1" | jq -r '.id + "," + .auth_key')
VOLUME_TRANSFER_ID=$(echo $VOLUME_TRANSFER_DETAILS | awk -F ',' '{print $1}')
VOLUME_TRANSFER_SECRET=$(echo $VOLUME_TRANSFER_DETAILS | awk -F ',' '{print $2}')
echo $VOLUME_TRANSFER_ID
echo $VOLUME_TRANSFER_SECRET
VOLUME_ID=$(openstack volume transfer request accept \
--auth-key ${VOLUME_TRANSFER_SECRET} \
${VOLUME_TRANSFER_ID} -c volume_id -f value)
......
......@@ -43,7 +43,7 @@ SNAPSHOT_ID=$(openstack volume snapshot create \
--volume ${VOLUME_ID} \
--force \
-f json \
${SNAPSHOT_NAME}_${TIMESTAMP} | jq -r ".id")
${SNAPSHOT_NAME} | jq -r ".id")
check_and_wait_until_available "Snapshot creation ($SNAPSHOT_ID)" "openstack volume snapshot show $SNAPSHOT_ID -f value -c status"
......@@ -51,13 +51,13 @@ echo "Starting volume creation based on snapshot $SNAPSHOT_ID"
VOLUME_ID=$(openstack volume create \
--snapshot ${SNAPSHOT_ID} \
-f json \
${SNAPSHOT_NAME}_${TIMESTAMP} | jq -r ".id")
${SNAPSHOT_NAME} | jq -r ".id")
check_and_wait_until_available "Volume creation ($VOLUME_ID)" "openstack volume show ${VOLUME_ID} -f value -c status"
echo "Creating volume transfer request for volume creation of volume $VOLUME_ID"
VOLUME_TRANSFER_DETAILS=$(openstack volume transfer request create \
--name ${SNAPSHOT_NAME}_transfer_${TIMESTAMP} \
--name ${SNAPSHOT_NAME}_transfer \
-f json \
${VOLUME_ID})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment