Comment 14 for bug 1768308

Revision history for this message
Anastasia (anastasia-macmood) wrote :

1. (TO-DO)
I have verified that indeed the constraints specified at bootstrap time only stored for the initial two models. It was not an intent and we will rectify. The behavior will be analogous to --config which when specified at bootstrap is treated as default/initial for all models added to the controller. Consequently, model constriants specified at bootstrap will be treated as default model constraints for all models added to this controller.

2. (TO-DO)
This also highlights the need to have --constraints as an option to 'add-model' to provide users with the ability to change/specify these at the model creation time rather avoiding our current 2-step process of 'add-model' and then 'set-model-constraints'. This will also be analogous to the model config behavior.

3. (TO-DO)
All instances of model-constraints options being called 'constraints' will be addressed to avoid further confusion with application constraints. Essentially, it will mean that commands such as bootstrap will gain a new option of 'model-constraints' and current 'constraints' option will have a deprecation warning and a suggestion to use 'model-constraints' instead.

4.
I have verified that there is no conflict between bootstrap-constraints and constraints. In other words, when both are specified as per example below, bootstrap-constraints ONLY applies to controller machines whereas constraints ONLY applies to non-controller (i.e. model) machines. Since the 2 are never merged, there is no need to worry about one overwriting the other. bootstrap-constraints will take precedence over constraints for controller machines when provided. The scenario I've used:
    i. bootstrap with ' --bootstrap-constraints root-disk=32G --constraints root-disk=64G';
    ii. switch to controller model;
    iii. check controller machine contains as a hardware characteristics root-disk of at least 32G, and it does https://pastebin.ubuntu.com/p/p7G2hRKvRT/ ;
    iv. deploy an application;
    v. check unit machine contains as a hardware characteristics root-disk of at least 64G, and it does https://pastebin.ubuntu.com/p/bZDcgy5WV3/.

Thank you for working through this muddle and bringing it to our attention.