SUSE / velum

Dashboard for CaaS Platform clusters (v1, v2 and v3)
https://www.suse.com/
Apache License 2.0
54 stars 30 forks source link

Fix pillar issue in public cloud #636

Closed jgleissner closed 6 years ago

jgleissner commented 6 years ago

I've added a call_runner function to salt interface and added a call to sync_pillar runner in cloud_cluster.rb. This is required to activate the external pillar, which is normally done at orchestration time, but for creating cluster nodes in the cloud, the pillar is needed before that. See also #399 for details.

I've also added a sleep(1) after the refresh_pillar, as we ran into the issue that the succeeding salt-cloud still works on the old pillar data, and this seems to work around it. I know that this is a bit ugly and perhaps can be fixed better in salt directly, but I haven't had any luck yet with narrowing the issue down.

jordimassaguerpla commented 6 years ago

Hi @jgleissner ! Could you check the failing tests in travis?

jgleissner commented 6 years ago

Hi, I'm looking into it. I believe it's because I didn't describe the call_runner function in spec/lib/velum/salt_spec.rb. I'm not really familiar with VCR cassettes and all that. It'll take me a bit to get up to speed on this. Sorry about that.

jgleissner commented 6 years ago

Hi @jordimassaguerpla , is there an easy way to run that travis test locally?

jgleissner commented 6 years ago

Don't worry about it, I think I got the test suite running ok.

ereslibre commented 6 years ago

However, travis is red...

jgleissner commented 6 years ago

Regarding the failing test, I believe this is due to the new runner call that does a http request to 127.0.0.1/run, which wasn't the case before, so the recorded cassette doesn't match anymore. I've been trying to figure out how this stuff works and made some progress, but haven't managed to record a new one yet. Sorry about that. If you can point me to any useful documentation etc. I'd appreciate it.

jgleissner commented 6 years ago

I've updated a couple of cassettes and now the tests should pass. Hope I did it correctly.