1
0
mirror of https://github.com/rancher/os.git synced 2025-09-16 06:59:12 +00:00

Fix issue with depulicate ssh keys after save

The CloudConfig.Save() did not load the metadata resulting in the diff
function always thinking the SSH keys were new.  This would cause them
to be saved over and over again just getting bigger and bigger.
This commit is contained in:
Darren Shepherd
2016-02-04 09:13:20 -07:00
parent 77242012e7
commit ce915927be
2 changed files with 46 additions and 0 deletions

View File

@@ -163,6 +163,9 @@ func (c *CloudConfig) Save() error {
if err != nil {
return err
}
exCfg = mergeMetadata(exCfg, readMetadata())
exData := map[interface{}]interface{}{}
if err := util.Convert(exCfg, &exData); err != nil {
return err