Zack Cerza
2564ef7028
Don't explode on ConnectionError in list_locks()
...
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-08-27 14:01:16 -06:00
Zack Cerza
8a87a422ca
Only pass lists to ssh_keyscan()
...
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-08-27 12:05:19 -06:00
Zack Cerza
7ad4e91a25
More hostname normalization
...
This time, for ssh_keyscan()
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-08-27 11:32:39 -06:00
Zack Cerza
4d44c82353
Normalize input hostnames in various functions
...
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-08-27 09:31:52 -06:00
Dan Mick
093a1b6937
lock.py: sort --brief output by status['name']
...
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2014-08-26 14:25:02 -07:00
Zack Cerza
883c97de4f
Fix a linter error
...
Wasn't much of a bug, but still.
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-08-26 11:47:48 -06:00
Zack Cerza
eafe91994e
Hostname handling for updatekeys
...
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-08-26 11:19:32 -06:00
Zack Cerza
b1a9ac1771
Less dangerous hostname mangling
...
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-08-26 10:35:46 -06:00
Zack Cerza
1637d3b45f
Fix --unlock
...
Note to self: clean up user/ctx.owner confusion
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-08-26 10:32:36 -06:00
Zack Cerza
4efb490892
Return old-style hostnames from lock_many()
...
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-08-26 10:23:03 -06:00
Zack Cerza
85f5945509
More hostname handling fixes
...
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-08-25 15:08:11 -06:00
Zack Cerza
3d4dc732bb
Revert "Canonicalize hostnames"
...
This reverts commit 29e8deefae
.
2014-08-25 14:40:40 -06:00
Zack Cerza
29e8deefae
Canonicalize hostnames
...
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-08-25 13:02:04 -06:00
Zack Cerza
92157d2b78
Don't dump all vm_host details when listing
...
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-08-25 11:14:39 -06:00
Zack Cerza
213bdc8b86
Reflect updated field names
...
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-08-25 11:14:39 -06:00
Zack Cerza
4eda1d3273
Add unlock_many() and use it when possible
...
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-08-25 11:14:38 -06:00
Zack Cerza
b9d7a9dec0
Make far less requests when simply locking
...
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-08-25 11:14:38 -06:00
Zack Cerza
40c1ee0442
Optimize some list_locks() calls
...
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-08-25 11:14:38 -06:00
Zack Cerza
e0aca2e6d7
Properly query for multiple machine types
...
...in list_locks()
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-08-25 11:14:38 -06:00
Zack Cerza
fb96923304
Use consistent URI for lock server
...
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-08-25 11:14:38 -06:00
Zack Cerza
aef78f4b3d
Use /nodes/ as the lock server endpoint
...
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-08-25 11:14:38 -06:00
Zack Cerza
b170345bda
Rewrite ssh public key updating
...
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-08-25 11:14:37 -06:00
Zack Cerza
1c04c7aff3
Use new ssh_keyscan() function
...
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-08-25 11:14:37 -06:00
Zack Cerza
5e5c32ef79
No need to be passing ctx to update_lock()
...
... or update_keys() or scan_for_locks()
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-08-25 11:14:37 -06:00
Zack Cerza
8048dc348c
Add new ssh_keyscan() method
...
This is just a cleaner implementation that will replace the existing
one(s).
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-08-25 11:14:37 -06:00
Zack Cerza
1d1697213f
Re-order functions in module
...
This is for readability.
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-08-25 11:14:37 -06:00
Zack Cerza
0f772222a4
keyscan_check(): don't require ctx to be passed
...
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-08-25 11:14:37 -06:00
Zack Cerza
bdc9e6e8c9
Update lock_many(), update_lock(), and main()
...
Also remove lockstatus.send_request()
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-08-25 11:14:37 -06:00
Zack Cerza
f5f1115881
Fix PEP-8 issues
...
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-08-25 11:14:37 -06:00
Zack Cerza
53a2c2f2d5
Refactoring
...
Create a new teuthology.provision module and move virtual machine
functions there. Move hostname manipulation functions to
teuthology.misc.
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-08-25 11:14:37 -06:00
Zack Cerza
af2a03a8a5
Update do_summary()
...
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-08-25 11:14:37 -06:00
Zack Cerza
533a5c5d8c
Rewrite list_locks()
...
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-08-25 11:14:36 -06:00
Zack Cerza
121fd02671
Make (de)canonicalize_hostname() work without user
...
Add tests proving they still work *with* usernames as well.
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-08-25 11:14:36 -06:00
Zack Cerza
04b319d847
Update/rewrite several functions to use paddles
...
Functions updated: lock.lock_one(), lock.unlock_one(),
lock.destroy_if_vm(), lockstatus.get_status()
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-08-25 11:14:36 -06:00
Warren Usui
b7a7383d75
Allow .teuthology.yaml to set downburst path
...
If .teuthology.yaml defines downburst, _get_downburst_exec()
now returns that value as the path to the downburst executable.
Also cleaned up code in create_if_vm. ctx.downburst_conf was
never defined, so the code that handled the AttributeError
was always being executed.
Fixes: 6921
Signed-off-by: Warren Usui <warren.usui@inktank.com>
2014-05-09 17:20:26 -07:00
Sandon Van Ness
9078513c0b
Fix for #8115
...
Increase boot disk size per #8115 where monitors shut down due to
/ being full on vm machines.
Signed-off-by: Sandon Van Ness <sandon@inktank.com>
2014-04-22 12:35:11 -07:00
Warren Usui
4c0151367e
Improve unlock error messages.
...
Added messages if the hostname is invalid, and if
the user is not the owner of the lock.
Fixes: 6295
Signed-off-by: Warren Usui <warren.usui@inktank.com>
2014-04-14 17:21:37 -07:00
Dan Mick
6dc29904c6
Change status to _status everywhere (fix regression)
...
0550dd1191
didn't add '_' to 'status'
everywhere it was needed.
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2014-04-10 14:53:10 -07:00
Alfredo Deza
0550dd1191
more statuses redefinition fixes
...
Signed-off-by: Alfredo Deza <alfredo.deza@inktank.com>
2014-04-09 16:56:19 -04:00
Alfredo Deza
30f3b01a0d
rename variable to avoid collision
...
Signed-off-by: Alfredo Deza <alfredo.deza@inktank.com>
2014-04-09 16:36:18 -04:00
Sage Weil
1ccabd802f
lock: allow -a with --brief
...
Signed-off-by: Sage Weil <sage@inktank.com>
2014-03-12 08:57:23 -07:00
Dan Mick
69ed31cc34
lock.py: allow --brief to stand on its own (without --list)
...
I use --brief all the time, and it's annoying to have to type
the useless --list at the same time.
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2014-03-10 19:38:46 -07:00
Zack Cerza
cfb7b948ea
Guard against ctx.config being unset or None
...
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-02-21 09:43:33 -06:00
Zack Cerza
021f84ac64
Simplify create_if_vm's downburst config logic
...
Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
2014-02-20 17:46:08 -06:00
Dan Mick
381d4aa873
lock.py: request only rsa keys from ssh-keyscan
...
New versions of ssh-keyscan return two keytypes if possible; this
breaks the comparison of "number of lines of output from keyscan"
to "number of hosts we request keys from". Fix by asking for only
one type of key (as older ssh-keyscans did).
Fixes : #7164
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2014-01-16 12:51:39 -08:00
Warren Usui
94f7dd1f3a
Implement --downburst-conf parameter for teuthology-lock.
...
Load the appropriate yaml information when found (this formerly
did not work). Make sure teuthology --lock works with a downburst
entry in the yaml files. Document how this works in README.rst.
Fixes : #6921
Reviewed-by: Dan Mick
2013-12-04 17:31:55 -08:00
Sandon Van Ness
c0297b436a
Changes suggested per review.
...
Signed-off-by: Sandon Van Ness <sandon@inktank.com>
2013-11-25 01:19:13 -08:00
Sandon Van Ness
f7af3e723e
Schedule-suite Use 'multi' tube for multiple types. Scheduling.
...
Signed-off-by: Sandon Van Ness <sandon@inktank.com>
2013-11-21 15:21:19 -08:00
Sandon Van Ness
c38eeec85f
Allow ability to use multi machine type deliminated by ,- \t.
...
I was originally attempting a more complicated locking mechanism
but I think its almost as good to just have it attempt the other
machine type if one.
Signed-off-by: Sandon Van Ness <sandon@inktank.com>
2013-11-21 14:19:44 -08:00
Sandon Van Ness
d4a632df5f
Support --os-version as argument.
...
You can use --os-type as an argument when not running teuthology
tests but instead just using teuthology-lock. This adds the ability
to also use --os-version so you can specify the version of the
distro without having to run an actual test with a yaml like you
normally would have had to do setting os_version in the yaml.
Signed-off-by: Sandon Van Ness <sandon@inktank.com>
2013-10-25 17:48:50 -07:00