Juniper / contrail-ansible-internal

Apache License 2.0
2 stars 5 forks source link

Parallel execution of the contrailctl command is not working #205

Open sgurumurthy opened 7 years ago

sgurumurthy commented 7 years ago

Say for example say I am deploying 3 controllers, 3 analytics node and 3 analyticsdb node in 3 machines (1 controller, 1 analytics and 1 analytics db per machine). In the Juju charm world the ipaddress of the controller,analytics and analyticsdb node itself will be available dynamically when I establish ‘relations’ between them. This means I will dynamically query and get the ipaddress and the write it into the. conf files. This means the configuration to take effect I will have multiple ‘contrailctl config’ sync commands executing simultaneously (this will be for different instances of the same charm as well as multiple instances different charms). It fails in this scenario. Juju provides the facility to scale up and scale down the number of units of a charm however the user wants and so we need this to be fixed for this to work.

hkumarmk commented 7 years ago

what error you see when you run them in parallel?

hkumarmk commented 7 years ago

From: Harish Kumar Date: Tuesday, February 14, 2017 at 10:04 AM To: Ashish Ranjan, Sivakumar Gurumurthy Cc: Rudra Rugge, Ignatious Johnson, Abhay Joshi Subject: Re: Update on contrail-charms status

Also I already asked for input in those bugs. Siva, please update the details in the bug on how you tested (how to reproduce it), what errors you get (including ansible playbook output),

sgurumurthy commented 7 years ago

Please try to following the steps to reproduce the issue without the Juju charms

  1. Provision the controller, analytics and analyticsdb docker containers in the same server
  2. Make changes in the corresponding ../contrail/*.conf files for the containers and apply the 'contrailctl' command simultaneously
hkumarmk commented 7 years ago

I just tested it and this is working for me and I always does the same (simultaneously start all containers which actually start contrailctl on all those containers at same time).

aranjan7 commented 7 years ago

What happens when you issue contrailctl on same containers simultaneously from different shells..

hkumarmk commented 7 years ago

hmmm it should succeed unless any conflicting or a command that need lock run by ansible - for example if ansible run multiple apt-get install at same time, one of them may fail/timeout.