-
Notifications
You must be signed in to change notification settings - Fork 1
VOSA-478 - fix for python3 as failed to create instance #67
base: develop
Are you sure you want to change the base?
Conversation
usr/bin/vosa
Outdated
@@ -1096,7 +1096,7 @@ function do_create() { | |||
if $USE_AWS_CLI ; then | |||
json="[{\"DeviceName\":\"/dev/sda1\", \"Ebs\":{\"VolumeSize\":$amazon_config_initial_disk_size} } ]" | |||
opts=( "--image-id" ${amazon_config_image} | |||
"count" "1:1" | |||
"count" "1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm curious: How does this translate to a Python 3 incompatibility?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@skybert - I could not make work with python3 installed server that is why I named message this way :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, so it's just a guess.
Looking at the documentation for ec2 run-instances
, count is described as:
Number of instances to launch. If a single number is provided, it is assumed to be the minimum to launch (defaults to 1). If a range is provided in the form min:max then the first number is interpreted as the minimum number of instances to launch and the second is interpreted as the maximum number of instances to launch.
Granted that the use of count
in our code here has a similar interpretation, 1:1
will not do any harm in any case. (I'm a bit puzzled that we use count
and not --count
here, but I haven't read through the code, so there's probably an explanation somewhere).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe indeed it should be --count 1:1
— maybe it just ignores this parameter completely? I'm pretty sure opts
here are options to aws ec2. Since the default is 1, we could probably remove the whole line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found this issue while I was creating environment for a customer and then I tested with edemo-dev again with and without --count 1:1 parameter and worked fine. I have removed and pushed into repo. @mogsie - please review again
usr/bin/vosa
Outdated
@@ -1096,7 +1096,7 @@ function do_create() { | |||
if $USE_AWS_CLI ; then | |||
json="[{\"DeviceName\":\"/dev/sda1\", \"Ebs\":{\"VolumeSize\":$amazon_config_initial_disk_size} } ]" | |||
opts=( "--image-id" ${amazon_config_image} | |||
"count" "1:1" | |||
"count" "1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe indeed it should be --count 1:1
— maybe it just ignores this parameter completely? I'm pretty sure opts
here are options to aws ec2. Since the default is 1, we could probably remove the whole line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Squash the two commits into one and use the second commit message. The first one is just confusing (fix for python3 ...
).
No description provided.