ensemble deploy needs better error messages
Bug #641562 reported by
Gustavo Niemeyer
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pyjuju |
Fix Released
|
High
|
Gustavo Niemeyer |
Bug Description
ensemble deploy will report in an incomprehensible manner when the user tries to deploy something and the machine hasn't finished initializing yet. It should detect that situation, and report the problem appropriately.
Note that this problem may happen in three situations:
a) The machine hasn't yet finished booted (SSH isn't available)
b) The machine has booted, but zookeeper isn't running
c) The machine has booted, zookeeper is running, but has not been initialized
All the three cases should return a nice error message to the user, explaining that initialization is still in progress.
Related branches
lp:~niemeyer/pyjuju/tuesday-sprint-hacks
- Kapil Thangavelu (community): Approve
-
Diff: 846 lines (+370/-128)14 files modifiedensemble/control/bootstrap.py (+6/-3)
ensemble/control/deploy.py (+6/-14)
ensemble/control/tests/test_bootstrap.py (+2/-2)
ensemble/control/tests/test_deploy.py (+13/-16)
ensemble/errors.py (+8/-0)
ensemble/lib/tests/test_twistutils.py (+36/-1)
ensemble/lib/twistutils.py (+9/-1)
ensemble/providers/dummy.py (+0/-1)
ensemble/providers/ec2/connect.py (+47/-24)
ensemble/providers/ec2/launch.py (+14/-18)
ensemble/providers/ec2/tests/test_connect.py (+134/-11)
ensemble/providers/ec2/tests/test_launch.py (+29/-2)
ensemble/state/sshforward.py (+16/-13)
ensemble/state/tests/test_sshforward.py (+50/-22)
lp:~niemeyer/pyjuju/wednesday-sprint-hacks
- Kapil Thangavelu (community): Approve
-
Diff: 444 lines (+127/-40)8 files modifiedensemble/control/deploy.py (+0/-1)
ensemble/providers/ec2/connect.py (+22/-8)
ensemble/providers/ec2/launch.py (+8/-8)
ensemble/providers/ec2/tests/test_connect.py (+69/-11)
ensemble/providers/ec2/tests/test_launch.py (+15/-5)
ensemble/providers/ec2/tests/test_state.py (+6/-6)
ensemble/state/initialize.py (+6/-1)
ensemble/state/tests/test_initialize.py (+1/-0)
description: | updated |
Changed in ensemble: | |
status: | New → Confirmed |
importance: | Undecided → High |
status: | Confirmed → Triaged |
Changed in ensemble: | |
status: | Triaged → In Progress |
assignee: | nobody → Gustavo Niemeyer (niemeyer) |
milestone: | none → 0.1 |
Changed in ensemble: | |
status: | In Progress → Fix Released |
To post a comment you must log in.
Example out as currently identified by the this bug
(py)kapil@ realms- laptop: ~/canonical/ ensemble/ trunk$ ./bin/ensemble --verbose=junk deploy --repository= ../formula- repo cassandra errors. NoConnection' >: No Ensemble Nodes realms- laptop: ~/canonical/ ensemble/ trunk$ ./bin/ensemble --verbose=junk deploy --repository= ../formula- repo cassandra user="ubuntu" remote_ host="ec2- 184-72- 197-49. compute- 1.amazonaws. com" remote_\ 609:3927( 0xb78546c0) :ZOO_INFO@ log_env@ 658: Client environment: zookeeper. version= zookeeper C client 3.4.0 609:3927( 0xb78546c0) :ZOO_INFO@ log_env@ 662: Client environment: host.name= realms- laptop 609:3927( 0xb78546c0) :ZOO_INFO@ log_env@ 669: Client environment: os.name= Linux 609:3927( 0xb78546c0) :ZOO_INFO@ log_env@ 670: Client environment: os.arch= 2.6.32- 24-generic 609:3927( 0xb78546c0) :ZOO_INFO@ log_env@ 671: Client environment: os.version= #42-Ubuntu SMP Fri Aug 20 14:24:04 UTC 2010 609:3927( 0xb78546c0) :ZOO_INFO@ log_env@ 679: Client environment: user.name= (null) 609:3927( 0xb78546c0) :ZOO_INFO@ log_env@ 687: Client environment: user.home= /home/kapil 609:3927( 0xb78546c0) :ZOO_INFO@ log_env@ 699: Client environment: user.dir= /home/kapil/ canonical/ ensemble/ trunk 609:3927( 0xb78546c0) :ZOO_INFO@ zookeeper_ init@727: Initiating client connection, host=localhost: 22181 sessionTimeout= 1000\ <null> context=0x9d6c7b0 flags=0 613:3927( 0xb6ea5b70) :ZOO_INFO@ check_events@ 1585: initiated connection to server [127.0.0.1:22181] 282:3927( 0xb6ea5b70) :ZOO_ERROR@ handle_ socket_ error_msg@ 1528: Socket [127.0.0.1:22181] zk retcode=-7, errno=110( Connectio\ 282:3927( 0xb6ea5b70) :ZOO_INFO@ check_events@ 1585: initiated connection to server [127.0.0.1:22181] 950:3927( 0xb6ea5b70) :ZOO_ERROR@ handle_ socket_ error_msg@ 1528: Socket [127.0.0.1:22181] zk retcode=-7, errno=110( Connectio\ 285:3927( 0xb6ea5b70) :ZOO_WARN@ zookeeper_ interest@ 1461: Exceeded deadline by 3337ms 285:3927( 0xb6ea5b70) :ZOO_INFO@ check_events@ 1585: initiated connection to server [127.0.0.1:22181] 804:3927( 0xb6ea5b70) :ZOO_INFO@ check_events@ 1632: session establishment complete on server [127.0.0.1:22181], sessionId=0\
2010-09-17 16:10:58,855 DEBUG Entering run-loop...
usage: ensemble deploy [-h] --repository REPOSITORY [--environment ENVIRONMENT] formula [service_name]
ensemble deploy: error: [Failure instance: Traceback (failure with no frames): <class 'ensemble.
]
(py)kapil@
2010-09-17 16:11:37,997 DEBUG Entering run-loop...
2010-09-17 16:11:39,595 DEBUG Spawning SSH process with remote_
port="2181" local_port="22181".
2010-09-17 16:11:46,
2010-09-17 16:11:46,
2010-09-17 16:11:46,
2010-09-17 16:11:46,
2010-09-17 16:11:46,
2010-09-17 16:11:46,
2010-09-17 16:11:46,
2010-09-17 16:11:46,
2010-09-17 16:11:46,
0 watcher=0xebbf50 sessionId=0 sessionPasswd=
2010-09-17 16:11:46,
2010-09-17 16:11:53,
n timed out): connection timed out (exceeded timeout by 3ms)
2010-09-17 16:11:53,
2010-09-17 16:11:59,
n timed out): connection timed out (exceeded timeout by 1ms)
2010-09-17 16:12:03,
2010-09-17 16:12:03,
2010-09-17 16:12:05,
x12b211c28ae0001, negotiated timeout=10000
usage: ensemble deploy [-h] --repository REPOSITORY [--environment ENVIRONMENT] formula [service_name]
ensemble deploy: error: [Failure instance: Traceback (failure with no frames): <class 'zookeeper.No...