sandialabs / sceptre-phenix

phenix is an orchestration tool and GUI for Sandia's minimega platform
https://sandialabs.github.io/sceptre-docs/
GNU General Public License v3.0
17 stars 23 forks source link

image create-from adds duplicate scripts #168

Closed nblair2 closed 6 months ago

nblair2 commented 7 months ago

When using the phenix image create-from command, the standard phenix scripts (POSTBUILD_APT_CLEANUP, POSTBUILD_NO_ROOT_PASSWD, POSTBUILD_PHENIX_HOSTNAME, POSTBUILD_PHENIX_BASE) are automatically added, even if the original config already has them.

Checking for the existence of these scripts in the original image config should be added.

activeshadow commented 7 months ago

@nblair2 I suspect it adds duplicate packages and overlays as well?

Can you provide an example phenix image create-from command to reproduce with, using one of the image configs that is included in phēnix by default please?

nblair2 commented 7 months ago

This fix works. If a user creates an image config with phenix image create test <options>, and then runs phenix image create-from test new-test <additional options>, the only difference between test and new-test will be the <additional options> (and the metadata: update: time).

If optional parameters like include_miniccc, include_protonuke, and skip_default_packages are not specified in the original config they are added with the default value false in the new config.