← Back to team overview

canonical-ubuntu-qa team mailing list archive

[Merge] ~andersson123/autopkgtest-cloud:migrate_to_openstack_from_nova into autopkgtest-cloud:master

 

Tim Andersson has proposed merging ~andersson123/autopkgtest-cloud:migrate_to_openstack_from_nova into autopkgtest-cloud:master.

Requested reviews:
  Canonical's Ubuntu QA (canonical-ubuntu-qa)

For more details, see:
https://code.launchpad.net/~andersson123/autopkgtest-cloud/+git/autopkgtest-cloud/+merge/451667
-- 
Your team Canonical's Ubuntu QA is requested to review the proposed merge of ~andersson123/autopkgtest-cloud:migrate_to_openstack_from_nova into autopkgtest-cloud:master.
diff --git a/docs/lxd.rst b/docs/lxd.rst
index 6a61e19..45fe1a1 100644
--- a/docs/lxd.rst
+++ b/docs/lxd.rst
@@ -27,8 +27,8 @@ To deploy a new node, after having sourced the cloud ``.rc`` file:
 
 .. code-block::
 
-    $ IMAGE=$(nova image-list | grep auto-sync/ubuntu-focal-daily-arm64-server | tail -n1 | awk '{ print $4 }')
-    $ NET_ID=$(nova network-show net_prod-proposed-migration | awk '/[[:space:]]id[[:space:]]/ { print $4 }')
+    $ IMAGE=$(openstack image list | grep auto-sync/ubuntu-focal-daily-arm64-server | tail -n1 | awk '{ print $4 }')
+    $ NET_ID=$(openstack network show net_prod-proposed-migration | awk '/[[:space:]]id[[:space:]]/ { print $4 }')
     $ openstack server create --image $IMAGE --flavor cpu8-ram8-disk100 --nic net-id=$NET_ID --key-name wendigo --security-group default --security-group lxd --user-data ~/autopkgtest-cloud/autopkgtest-cloud/tools/armhf-lxd.userdata -- lxd-armhfN
 
 In the event that you want to deploy the new node on a specifc host you can use the ``--hint same_host`` argument e.g. ``openstack server create --hint same_host=2e838a71-f6d9-46c4-94f9-dd0c6a2632fe``.
@@ -85,8 +85,8 @@ juju environment and execute ``mojo run`` on the controller.
 
   .. code-block::
 
-     $ IMAGE=$(nova image-list | grep auto-sync/ubuntu-$(distro-info --lts)-daily-arm64-server | tail -n1 | awk '{ print $4 }')
-     $ NET_ID=$(nova network-show net_prod-proposed-migration | awk '/[[:space:]]id[[:space:]]/ { print $4 }')
+     $ IMAGE=$(openstack image list | grep auto-sync/ubuntu-$(distro-info --lts)-daily-arm64-server | tail -n1 | awk '{ print $4 }')
+     $ NET_ID=$(openstack network show net_prod-proposed-migration | awk '/[[:space:]]id[[:space:]]/ { print $4 }')
      $ nova boot --image $IMAGE --flavor cpu4-ram8-disk50 --nic net-id=$NET_ID --key_name wendigo --security-groups default,lxd --user-data <(autopkgtest-cloud/autopkgtest-cloud/tools/create-armhf-cluster-member TYPE [IP]) -- lxd-armhfN
 
   Where ``TYPE`` is one of:
diff --git a/mojo/make-lxd-secgroup b/mojo/make-lxd-secgroup
index 3199669..14cb740 100755
--- a/mojo/make-lxd-secgroup
+++ b/mojo/make-lxd-secgroup
@@ -15,14 +15,14 @@ fi
 LXD_IPS=$(juju status --format=json autopkgtest-lxd-worker | jq --monochrome-output --raw-output '.applications["autopkgtest-lxd-worker"].units | map(.["public-address"])[]')
 HAPROXY_IPS=$(juju status --format=json haproxy-lxd-armhf | jq --monochrome-output --raw-output '.applications["haproxy-lxd-armhf"].units | map(.["public-address"])[]')
 
-if ! nova secgroup-list-rules lxd >/dev/null 2>/dev/null; then
-        nova secgroup-create lxd "Let the LXD workers communicate with the LXD VMs"
+if ! openstack security group rule list lxd >/dev/null 2>/dev/null; then
+        openstack security group create lxd "Let the LXD workers communicate with the LXD VMs"
 fi
 
 for ip in ${LXD_IPS} ${HAPROXY_IPS}; do
-        nova secgroup-add-rule lxd tcp 8443 8443 "${ip}/32" 2>/dev/null || true  # perhaps it already existed
+        openstack security group rule create lxd --protocol tcp --dst-port 8443:8443 --remote-ip "${ip}/32" 2>/dev/null || true  # perhaps it already existed
 done
 
 if [ -n "${ROUTER_IP:-}" ]; then
-        nova secgroup-add-rule lxd tcp 8443 8443 "${ROUTER_IP}/32" 2>/dev/null || true  # perhaps it already existed
+        openstack security group rule create lxd --protocol tcp --dst-port 8443:8443 --remote-ip "${ROUTER_IP}/32" 2>/dev/null || true  # perhaps it already existed
 fi