Openstack: nova boot

1) Get Images list

[stack@localhost devstack]$ glance image-list
+————————————–+———————————+————-+——————+———-+——–+
| ID | Name | Disk Format | Container Format | Size | Status |
+————————————–+———————————+————-+——————+———-+——–+
| 2ea362d6-3cf3-4e9f-8cad-5a574cc1bdc9 | cirros-0.3.2-x86_64-uec | ami | ami | 25165824 | active |
| 66b6e2b2-8ffe-48d9-a5d0-0d1fffcbef80 | cirros-0.3.2-x86_64-uec-kernel | aki | aki | 4969360 | active |
| f872358e-7e24-4b86-88c4-c9719e1e63b6 | cirros-0.3.2-x86_64-uec-ramdisk | ari | ari | 3723817 | active |
+————————————–+———————————+————-+——————+———-+——–+

2) get flavor’s list

[stack@localhost devstack]$ nova flavor-list
+—-+———–+———–+——+———–+——+——-+————-+———–+
| ID | Name | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor | Is_Public |
+—-+———–+———–+——+———–+——+——-+————-+———–+
| 1 | m1.tiny | 512 | 1 | 0 | | 1 | 1.0 | True |
| 2 | m1.small | 2048 | 20 | 0 | | 1 | 1.0 | True |
| 3 | m1.medium | 4096 | 40 | 0 | | 2 | 1.0 | True |
| 4 | m1.large | 8192 | 80 | 0 | | 4 | 1.0 | True |
| 42 | m1.nano | 64 | 0 | 0 | | 1 | 1.0 | True |
| 5 | m1.xlarge | 16384 | 160 | 0 | | 8 | 1.0 | True |
| 84 | m1.micro | 128 | 0 | 0 | | 1 | 1.0 | True |
+—-+———–+———–+——+———–+——+——-+————-+———–+

3) Boot Image with specific flavour and name.

[stack@localhost devstack]$ nova boot 2ea362d6-3cf3-4e9f-8cad-5a574cc1bdc9 1
[stack@localhost devstack]$ nova boot –flavo 1 –image  2ea362d6-3cf3-4e9f-8cad-5a574cc1bdc9 abc
+————————————–+—————————————————————-+
| Property                             | Value                                                          |
+————————————–+—————————————————————-+
| OS-DCF:diskConfig                    | MANUAL                                                         |
| OS-EXT-AZ:availability_zone          | nova                                                           |
| OS-EXT-SRV-ATTR:host                 | –                                                              |
| OS-EXT-SRV-ATTR:hypervisor_hostname  | –                                                              |
| OS-EXT-SRV-ATTR:instance_name        | instance-00000002                                              |
| OS-EXT-STS:power_state               | 0                                                              |
| OS-EXT-STS:task_state                | scheduling                                                     |
| OS-EXT-STS:vm_state                  | building                                                       |
| OS-SRV-USG:launched_at               | –                                                              |
| OS-SRV-USG:terminated_at             | –                                                              |
| accessIPv4                           |                                                                |
| accessIPv6                           |                                                                |
| adminPass                            | ryZeHJ4BPy99                                                   |
| config_drive                         |                                                                |
| created                              | 2015-04-10T17:38:30Z                                           |
| flavor                               | m1.tiny (1)                                                    |
| hostId                               |                                                                |
| id                                   | 31d1014e-4590-4cd3-81e2-725258d4bb6b                           |
| image                                | cirros-0.3.2-x86_64-uec (2ea362d6-3cf3-4e9f-8cad-5a574cc1bdc9) |
| key_name                             | –                                                              |
| metadata                             | {}                                                             |
| name                                 | abc                                                            |
| os-extended-volumes:volumes_attached | []                                                             |
| progress                             | 0                                                              |
| security_groups                      | default                                                        |
| status                               | BUILD                                                          |
| tenant_id                            | 9e540565df04456c815fdccdef0daa2c                               |
| updated                              | 2015-04-10T17:38:30Z                                           |
| user_id                              | 6ffbead5210a42548797d51abe56acc2                               |
+————————————–+—————————————————————-+
[stack@localhost devstack]$ nova list

Initially spawning

+————————————–+——+——–+————+————-+——————+
| ID | Name | Status | Task State | Power State | Networks |
+————————————–+——+——–+————+————-+——————+
| 31d1014e-4590-4cd3-81e2-725258d4bb6b | abc | BUILD | spawning | NOSTATE | private=10.0.0.2 |
+————————————–+——+——–+————+————-+——————+

Now active

[stack@localhost devstack]$ nova list
+————————————–+——+——–+————+————-+——————+
| ID | Name | Status | Task State | Power State | Networks |
+————————————–+——+——–+————+————-+——————+
| 31d1014e-4590-4cd3-81e2-725258d4bb6b | abc | ACTIVE | – | Running | private=10.0.0.2 |
+————————————–+——+——–+————+————-+——————+
[stack@localhost devstack]$

Advertisements

Openstack Issues: AttributeError: ‘NoneType’ object has no attribute ‘url’

if you see below issue, its due to new pip-6.1.1  release.  In this release they have remove the attribute “url” and used “link” in that place, so, devstack guys who were using “url” in the “openstack/requirements” project also need to change the variable. And I think you don’t have the updated “openstack/requirements” project.

—————-
+ python update.py /opt/stack/keystone
Traceback (most recent call last):
File “update.py”, line 273, in <module>
main(options, args)
File “update.py”, line 258, in main
_copy_requires(options.suffix, options.softupdate, args[0])
File “update.py”, line 219, in _copy_requires
source_reqs = _parse_reqs(‘global-requirements.txt’)
File “update.py”, line 140, in _parse_reqs
reqs[_parse_pip(pip)] = pip
File “update.py”, line 101, in _parse_pip
elif install_require.url:
File “/usr/lib/python2.7/site-packages/pip/req/req_install.py”, line 128, in url
return self.link.url
AttributeError: ‘NoneType’ object has no attribute ‘url’

————

Work around:

​Following steps you can use to solve this issue:
1. Do ./unstack.sh
2. Go to /op​t/stack/ and delete the requirements folder.
3. Go to devstack folder and run stack.sh again.

Resend Patch to Gerrit

1) You must be having git already. ( for ex: Rally)

git clone https://github.com/stackforge/rally.git

2)  get your branch

Ex:

https://review.openstack.org/#/c/170537/

git review -d 170537

3) Run this such that Change-Id will be updated.

gitdir=$(git rev-parse –git-dir); scp -p -P 29418 @review.openstack.org:hooks/commit-msg ${gitdir}/hooks/

4) make your code changes and amend

git commit -a –amend

5) Check if your Changelog, Change-Id are same as earlier.

6) Send patch

git review -d