Skip to content

Commit 488027d

Browse files
committed
Fix pcluster update behavior with additional instance types data
Additional instance types data must be loaded not only when loading the configuration from file, but also from CloudFormation in order to allow the refresh operations to work correctly. This commit also marks as ignored the update policy of the `instance_types_data` parameter to avoid changes being displayed just because of the json data re-ordering. Signed-off-by: ddeidda <[email protected]>
1 parent 553838f commit 488027d

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

cli/src/pcluster/config/mappings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1032,7 +1032,7 @@
10321032
"type": JsonCfnParam,
10331033
"default": {},
10341034
"cfn_param_mapping": "InstanceTypesData",
1035-
"update_policy": UpdatePolicy.SUPPORTED
1035+
"update_policy": UpdatePolicy.IGNORED
10361036
}),
10371037
]
10381038

cli/src/pcluster/config/pcluster_config.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,9 @@ def __init__(
101101
self.__init_sections_from_cfn(cluster_name)
102102
else:
103103
self.__init_sections_from_file(cluster_label, self.config_parser, fail_on_file_absence)
104-
# Load instance types data if present in config file
105-
self.__init_additional_instance_types_data()
104+
105+
# Load instance types data if available
106+
self.__init_additional_instance_types_data()
106107

107108
self.__autorefresh = auto_refresh # Initialization completed
108109

0 commit comments

Comments
 (0)