Skip to content
This repository has been archived by the owner on Aug 20, 2019. It is now read-only.

VOSA-478 - fix for python3 as failed to create instance #67

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

monzurul
Copy link

No description provided.

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"
Copy link

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?

Copy link
Author

@monzurul monzurul Dec 31, 2018

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 :-)

Copy link

@skybert skybert Dec 31, 2018

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).

Copy link
Member

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.

Copy link
Author

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"
Copy link
Member

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.

@monzurul monzurul requested review from mogsie and skybert March 15, 2019 04:36
Copy link

@skybert skybert left a 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 ...).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants