[cloudstack] branch 4.11 updated: vr: defer was broken in VR because of json name change

2018-10-29 Thread rohit
This is an automated email from the ASF dual-hosted git repository.

rohit pushed a commit to branch 4.11
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/4.11 by this push:
 new f7bc580  vr: defer was broken in VR because of json name change
f7bc580 is described below

commit f7bc5807a3bec9fea104133ebb894dabfc0bd5fc
Author: Rene Diepstraten 
AuthorDate: Mon Oct 29 16:18:25 2018 +0530

vr: defer was broken in VR because of json name change

Committed at f0491d5c72c3161777ca49ae809606a6704df5ff (#2979).

After upgrade from CS 4.10 to CS 4.11, multiple VRs did not start through.
It did not properly defer the finalize config in update_config.py.
Apparently, the json files are now called differently: where it used to
be vm_dhcp_entry.json it now has a uuid added, for example
vm_metadata.json.4d727b6e-2b48-49df-81c3-b8532f3d6745.
The if statement that checks if the finalize can be safely deferred
therefore no longer matches. This PR contains a fix so finalize is
defered again.

Signed-off-by: Rohit Yadav 



[cloudstack] branch 4.11 updated: vr: defer was broken in VR because of json name change (#2979)

2018-10-29 Thread rohit
This is an automated email from the ASF dual-hosted git repository.

rohit pushed a commit to branch 4.11
in repository https://gitbox.apache.org/repos/asf/cloudstack.git


The following commit(s) were added to refs/heads/4.11 by this push:
 new f0491d5  vr: defer was broken in VR because of json name change (#2979)
f0491d5 is described below

commit f0491d5c72c3161777ca49ae809606a6704df5ff
Author: Rohit Yadav 
AuthorDate: Mon Oct 29 16:11:43 2018 +0530

vr: defer was broken in VR because of json name change (#2979)

After upgrade from CS 4.10 to CS 4.11, multiple VRs did not start through.
It did not properly defer the finalize config in update_config.py.
Apparently, the json files are now called differently: where it used to
be vm_dhcp_entry.json it now has a uuid added, for example
vm_metadata.json.4d727b6e-2b48-49df-81c3-b8532f3d6745.
The if statement that checks if the finalize can be safely deferred
therefore no longer matches. This PR contains a fix so finalize is
defered again.

Signed-off-by: Rohit Yadav 
---
 systemvm/debian/opt/cloud/bin/update_config.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/systemvm/debian/opt/cloud/bin/update_config.py 
b/systemvm/debian/opt/cloud/bin/update_config.py
index 02161b6..77008af 100755
--- a/systemvm/debian/opt/cloud/bin/update_config.py
+++ b/systemvm/debian/opt/cloud/bin/update_config.py
@@ -52,7 +52,7 @@ def process_file():
 qf.setFile(sys.argv[1])
 qf.load(None)
 # These can be safely deferred, dramatically speeding up loading times
-if not (os.environ.get('DEFER_CONFIG', False) and sys.argv[1] in 
('vm_dhcp_entry.json', 'vm_metadata.json')):
+if not (os.environ.get('DEFER_CONFIG', False) and ('vm_dhcp_entry.json' in 
sys.argv[1] or 'vm_metadata.json' in sys.argv[1])):
 # Converge
 finish_config()