update VM password databag only when there is vm_password.json configuration update

from the management server

from the managment server. With out thix fix, password data bag is getting
updated on every network rule configuration and hence VR serving the password for guest
instance password requests every time
This commit is contained in:
Murali Reddy 2016-12-04 23:36:28 +05:30
parent d42f641f86
commit f751cf24fb
2 changed files with 6 additions and 4 deletions

View File

@ -921,9 +921,11 @@ def main(argv):
config.address().compare()
config.address().process()
logging.debug("Configuring vmpassword")
password = CsPassword("vmpassword", config)
password.process()
process_file = argv[1]
if process_file in ["cmd_line.json", "vm_password.json"]:
logging.debug("Configuring vmpassword")
password = CsPassword("vmpassword", config)
password.process()
logging.debug("Configuring vmdata")
metadata = CsVmMetadata('vmdata', config)

View File

@ -41,7 +41,7 @@ currentGuestNetConfig = "/etc/cloudstack/guestnetwork.json"
def finish_config():
# Converge
returncode = configure.main([])
returncode = configure.main(sys.argv)
sys.exit(returncode)