Ask Your Question

sameer's profile - activity

2016-12-13 13:52:57 -0600 received badge  Nice Answer (source)
2016-01-20 10:33:02 -0600 received badge  Great Question (source)
2015-07-19 03:01:37 -0600 received badge  Good Question (source)
2015-06-17 08:26:57 -0600 received badge  Nice Question (source)
2014-12-12 03:18:06 -0600 received badge  Famous Question (source)
2014-10-02 22:46:30 -0600 received badge  Student (source)
2014-07-26 17:34:13 -0600 received badge  Famous Question (source)
2014-07-26 17:34:13 -0600 received badge  Popular Question (source)
2014-07-26 17:34:13 -0600 received badge  Notable Question (source)
2014-07-01 05:28:10 -0600 received badge  Self-Learner (source)
2014-07-01 05:28:10 -0600 received badge  Teacher (source)
2014-07-01 05:27:06 -0600 received badge  Notable Question (source)
2014-06-17 00:04:15 -0600 received badge  Popular Question (source)
2014-06-16 20:45:33 -0600 answered a question nova get-password

Answering my own question. The script below explains it. (

#!/usr/bin/env bash
if ! curl -s -f > $SSH_KEYFILE; then
  echo  "Failed to get key"
PASSWORD=`openssl rand -base64 48 | tr -d '/+' | cut -c1-16`
sudo usermod ubuntu -p `openssl passwd -1 $PASSWORD`

ssh-keygen -e -f $SSH_KEYFILE -m PKCS8 > $SSL_KEYFILE
ENCRYPTED=`echo "$PASSWORD" | openssl rsautl -encrypt -pubin -inkey $SSL_KEYFILE -keyform PEM | openssl base64 -e -A`
echo $'\n'"ENCRYPTED_PASSWORD:$ENCRYPTED" | sudo tee /dev/console
curl -X POST -d $ENCRYPTED || true
# get the script
# curl -sOL
# add keypair
# nova add-key --pub-key .ssh/ mykey
# boot instance
# nova boot --flavor <flavor-id> --image <image-uuid> --key-name mykey --user-data test
# Get the password on the client side:
# nova get-password test .ssh/id_rsa
# Or with an older nova install:
# nova console-log test | grep 'ENCRYPTED_PASSWORD' | cut -d':' -f2 | tail -n 1 | openssl base64 -d -A | openssl rsautl -decrypt -inkey .ssh/id_rsa
2014-06-16 04:13:49 -0600 asked a question nova get-password

Suppose I want to do my own image customization (no cloud-init), including generating a password and posting it to the metadata password url. How do I encrypt it with the public key obtained from the instance metadata such that 'nova get-password' can decrypt it.


2014-06-14 19:38:16 -0600 received badge  Scholar (source)
2014-06-14 19:38:13 -0600 commented answer horizon session timeout

That explains it then! Because I did set session_timeout to a large number yet the session was expiring. Must be the token expiry you mentioned. Thanks.

2014-06-13 19:54:17 -0600 received badge  Editor (source)
2014-06-13 19:53:13 -0600 asked a question horizon session timeout

Is there a way to disable horizon's session timeout completely? I'm running a dev/test openstack IceHouse on Ubuntu trusty 14.04 Thanks,

2014-06-08 09:24:18 -0600 commented answer Ubuntu 14.04 cloud image won't boot

Thanks! This was indeed my issue. The metadata-agent on neutron was configured with the wrong region name. Once fixed my Ubuntu was able to finish booting (cloud-tools completed). I would've marked this as an answer but I'm not the OP :-)

2014-06-07 05:40:47 -0600 commented answer Ubuntu 14.04 cloud image won't boot

These do not seem to be about the same issue. In my case the instance spawns successfully even though it fails to resize.

2014-06-07 04:15:03 -0600 commented question Ubuntu 14.04 cloud image won't boot

I have the same problem. If I turn on debugging in nova-compute.conf I see the following:

2014-06-07 19:07:59.342 13686 DEBUG nova.virt.disk.api [req-609cce86-413a-483f-a522-a91b2c424bec e03818df7adc4763b143e93e34819b0f 8ca3061f56ad4dd593094826c0a7cdbc] Unable to mount image /var/lib/nova/instances/69e58818-956c-40d3-8ee3-2d460dd51e3b/disk with error Error mounting /var/lib/nova/instances/69e58818-956c-40d3-8ee3-2d460dd51e3b/disk with libguestfs (/usr/bin/supermin-helper exited with error status 1.
See Cannot resize. is_image_partitionless /usr/lib/python2.7/dist-packages/nova/virt/disk/