Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sizing parameters ignored upon cluster creation #149

Closed
sbesombes-CS opened this issue Mar 8, 2022 · 3 comments
Closed

sizing parameters ignored upon cluster creation #149

sbesombes-CS opened this issue Mar 8, 2022 · 3 comments
Assignees
Labels
bug Something isn't working v21.11
Milestone

Comments

@sbesombes-CS
Copy link
Contributor

version: v21.11.0

When trying to create a cluster with the following command the sizing parameters seems to be ignored:

safescale cluster create callisto --complexity=small --flavor=K8S --gw-sizing="template=d2-2" --master-sizing="template=b2-7" --node-sizing="template=b2-30"
Here is the result:
image

Here are the logs:
cluster.log

@oscarpicas oscarpicas self-assigned this Mar 8, 2022
@oscarpicas oscarpicas added bug Something isn't working v21.11 labels Mar 8, 2022
@oscarpicas oscarpicas added this to the develop milestone Mar 8, 2022
@oscarpicas
Copy link
Collaborator

oscarpicas commented Mar 9, 2022

Notice that the output of the command:

safescale cluster create callisto --complexity=small --flavor=K8S --gw-sizing="template=d2-2" --master-sizing="template=b2-7" --node-sizing="template=b2-30"

IS the expected one according to the docs.

This might seem surprising but it's not:
safescale uses urfave/cli/v2 to run the commands, this means that we MUST write flags before args:
https://github.com/urfave/cli/blob/master/docs/migrate-v1-to-v2.md#flags-before-args

So, what actually happens is that previous command actually is:
safescale cluster create callisto

because all the flags specified after callisto are IGNORED.

This would seem an invalid bug.... but running the fixed command:
safescale cluster create --complexity=small --flavor=K8S --gw-sizing="template=d2-2" --master-sizing="template=b2-7" --node-sizing="template=b2-30" callisto

creates the cluster, this time taking into account all the flags BUT some of the chosen templates are WRONG.

So, 1st thing is fixing the template selection, then making explicit in the docs that the wrong choice in flag order results in ignored parameters and finally adding warnings if we detect a command that is 'obviously' wrong

oscarpicas added a commit that referenced this issue Mar 10, 2022
@oscarpicas
Copy link
Collaborator

Much better (running command safescale cluster create --complexity=small --flavor=K8S --gw-sizing="template=d2-2" --master-sizing="template=b2-7" --node-sizing="template=b2-30" callista)

image

@oscarpicas
Copy link
Collaborator

oscarpicas commented Mar 10, 2022

In order to test the fix, you should build the branch 'develop' or wait for next release. Assuming you have git, and docker in your machine, the fastest way to build is:

git clone https://github.com/CS-SI/SafeScale --depth 1 -b develop
cd SafeScale
./create-local-docker.sh

After that, you should see a ./exported directory, in there you should found the safescale and safescaled binaries

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working v21.11
Projects
None yet
Development

No branches or pull requests

2 participants