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
Use separate flavors for slave and master nodes #342
Conversation
"type": "text", | ||
"order": 30, | ||
"label": "Flavor", | ||
"label": "Master flavor", | ||
"default": config.get("KS_MASTER_FLAVOR"), |
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.
imo its better to set defaults directly here, for ex m1.medium for master, m1.large for slaves
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.
decided not to use values from config at all. may be later use profile for each provisioner with predefined settings
raise ValueError("Flavor for master '%s' is not found" % self.cluster.metadata["master_flavor"]) | ||
self.meta["slave_flavor"] = self.c.get_flavor(self.cluster.metadata["slave_flavor"]) | ||
if self.meta["slave_flavor"] is None: | ||
raise ValueError("Flavor for slave '%s' is not found" % self.cluster.metadata["master_flavor"]) |
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.
in what case it can be None? through api calls?
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.
yes, it is api server) we need to validate data on server side too
self.meta["flavor"] = self.c.get_flavor(self.cluster.metadata["flavor"]) | ||
if self.meta["flavor"] is None: | ||
raise ValueError("Flavor '%s' is not found" % self.cluster.metadata["flavor"]) | ||
self.meta["master_flavor"] = self.c.get_flavor(self.cluster.metadata["master_flavor"]) |
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.
btw, why some checks are not in try-catch block?
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.
they are optional
cc6851d
to
dcdd984
Compare
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.
LGFM
dcdd984
to
0e9390a
Compare
No description provided.