Bug 2184: Wait for cloud init

Adds an explicit wait for cloud-init to finish before
proceeding with installation

Change-Id: I76ec924b07a42f8d267acc8dd34920c032a37769
Signed-off-by: Mark Beierl <mark.beierl@canonical.com>
diff --git a/jenkins/ci-pipelines/ci_stage_3.groovy b/jenkins/ci-pipelines/ci_stage_3.groovy
index 50effe0..1474f89 100644
--- a/jenkins/ci-pipelines/ci_stage_3.groovy
+++ b/jenkins/ci-pipelines/ci_stage_3.groovy
@@ -447,6 +447,8 @@
                         logLevel: 'INFO',
                         pty: true
                     ]
+                    // Ensure the VM is ready
+                    sshCommand remote: remote, command: 'cloud-init status --wait'
 
                     // Force time sync to avoid clock drift and invalid certificates
                     sshCommand remote: remote, command: 'sudo apt-get update'