Skip to content

Instantly share code, notes, and snippets.

@vkmc
vkmc / Setting up Quantum 29-01-13
Created January 29, 2013 13:55
Adding Quantum and Swift in a DevStack deployment. Keeps failing and I can't figure out why :/
2013-01-29 09:03:14 stack.sh log stack.sh.log.2013-01-29-090314
2013-01-29 09:03:14 + echo_summary 'Installing package prerequisites'
2013-01-29 09:03:14 + [[ -t 3 ]]
2013-01-29 09:03:14 + [[ True != \T\r\u\e ]]
2013-01-29 09:03:14 + echo Installing package prerequisites
2013-01-29 09:03:14 + is_ubuntu
2013-01-29 09:03:14 + [[ -z deb ]]
2013-01-29 09:03:14 + '[' deb = deb ']'
2013-01-29 09:03:14 Installing package prerequisites
2013-01-29 09:03:14 ++ get_packages /home/vkmc/devstack/files/apts
@vkmc
vkmc / How to check screen logs
Created January 29, 2013 14:51
Real-time screen logs of OpenStack running services
There are various logs one can check. For example if you execute a command then you can resume your stack screen and check out logs of each process.
# Deploy the environment ./stack.sh
# Open screen logs screen -r stack
# Shift between screens ctrl+a <screen no.> - e.g. ctrl+a 1
# Scroll up in particular screen ctrl+a esc and up arrow to scroll up
# Brings up a list of the tabs and lets you choose one ctrl+a "
# Move to next screen ctrl+a n
# Dettaches the screen (exit) ctrl+a d
@vkmc
vkmc / FreeNode ChanServ Flags
Created February 5, 2013 23:05
Output from ChanServ
-ChanServ- Help for FLAGS:
-ChanServ-
-ChanServ- The FLAGS command allows for the granting/removal of channel
-ChanServ- privileges on a more specific, non-generalized level. It
-ChanServ- supports nicknames, groups and hostmasks as targets.
-ChanServ-
-ChanServ- When only the channel argument is given, a listing of
-ChanServ- permissions granted to users will be displayed.
-ChanServ-
-ChanServ- Syntax: FLAGS <#channel>
@vkmc
vkmc / Git fame 06-02-13
Created February 6, 2013 22:06
Some Git metrics
[vkmc@thermalx2 stack]$ cd /opt/stack/api-site/ && git fame
Blame: 100% |ooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo| Time: 0:00:21
Total number of files: 1,076
Total number of lines: 51,774
Total number of commits: 492
+-----------------------+--------+---------+-------+--------------------+
| name | loc | commits | files | percent |
+-----------------------+--------+---------+-------+--------------------+
| annegentle | 42,981 | 89 | 927 | 83.0 / 18.1 / 86.2 |
@vkmc
vkmc / Glance pagination
Last active December 12, 2015 12:39
Anita's Glance pagination - Testing 12.02.2013.1908
[vkmc@thermalx2 devstack]$ glance image-list --page-size 2
+--------------------------------------+---------------------------------+-------------+------------------+-----------+--------+
| ID | Name | Disk Format | Container Format | Size | Status |
+--------------------------------------+---------------------------------+-------------+------------------+-----------+--------+
| 644d399a-ec90-420e-8ce8-2d29559b74e7 | CentOS 6 | qcow2 | bare | 585564160 | saving |
| 1e17fed5-abda-4f8f-bfb6-af816ec3be6b | cirros-0.3.0-x86_64-uec | ami | ami | 25165824 | active |
| 1bcfb925-92e6-4f19-b572-19c4a68e775d | cirros-0.3.0-x86_64-uec-kernel | aki | aki | 4731440 | active |
| 223b8f1b-e05a-4cfb-959e-f9359dfac9d8 | cirros-0.3.0-x86_64-uec-ramdisk | ari | ari | 2254249 | active |
| 69753ee8-1aee-4706-a96b-431a693ead7c | RHEL5
@vkmc
vkmc / Glance private images
Last active December 14, 2015 10:19
Private images, members and tenants
So, here are my tenant list... I'll be playing around with admin and demo
[vkmc@thermalx2 ~]$ keystone tenant-list
+----------------------------------+--------------------+---------+
| id | name | enabled |
+----------------------------------+--------------------+---------+
| 2b3a40fe165d4a4aa6ac6ec2694bbaba | admin * | True |
| f22c5f491c174eb0b33a6ed0ccdf3995 | alt_demo | True |
| 9fa49fa0c1964636a40e8a5ce9e65401 | demo * | True |
| 5a7b918b5ff6480daf4b8fd394bcd15c | invisible_to_admin | True |
@vkmc
vkmc / Keystone roles deletion
Created March 4, 2013 13:06
Steps to remove a user from a tenant (BLOCKED)
List tenants
We are going to work on demo
[vkmc@thermalx2 projects]$ keystone tenant-list
+----------------------------------+--------------------+---------+
| id | name | enabled |
+----------------------------------+--------------------+---------+
| 5c56bef830124dafb953a15025beeef1 | admin | True |
| c147bc63aaae46a4bde468e65cdb5f94 | alt_demo | True |
| c7043fed69954395ac7949266e3a8b48 | demo | True |
@vkmc
vkmc / Nova instances listing
Created March 4, 2013 13:44
Trying to list all the instances in a tenant (BLOCKED)
When trying to retrieve instances list by for tenant deletion
the current tenant instances will be obtained, even though
the --tenants parameter is specified.
Is a nova client bug?
Testing two tenants
demo with instances Cirros1.1 and Cirros1.2
demo2 with instances Cirros2.1 and Cirros 2.2
@vkmc
vkmc / Keystone ec2-credentials management
Created March 4, 2013 14:17
ec2-credentials removal on tenant deletion
Keystone ec2-credentials management
Apparently ec2-credentials are not directly related to tenants, and the delete function doesn't provide
a way to select a tenant.
So, when listing credentials-list we get all ec2-credentials for every tenant
[vkmc@thermalx2 devstack]$ keystone ec2-credentials-list
+--------+----------------------------------+----------------------------------+
| tenant | access | secret |
+--------+----------------------------------+----------------------------------+
@vkmc
vkmc / Cinder list volumes
Created March 4, 2013 17:46
Trying to list all the volumes associated to a tenant
Cinder provides the list command to list all the volumes, but unluckily in this case we don't have
listing per tenant either.
[vkmc@thermalx2 devstack]$ cinder help list
usage: cinder list [--all-tenants [<0|1>]] [--display-name <display-name>]
[--status <status>]
List all the volumes.
Optional arguments: