Project

General

Profile

Bug #12128

calamari-ctl intialize fails when there are no connected salt-minions

Added by Christina Meno about 6 years ago. Updated almost 6 years ago.

Status:
Can't reproduce
Priority:
Normal
Assignee:
-
Category:
Backend (packaging/deployment)
Target version:
% Done:

0%

Source:
other
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Crash signature (v1):
Crash signature (v2):

Description

https://github.com/ceph/calamari/commit/97c4270b2ed09c481558f7a033dc402de8a4142f
adds updated to already connected minions during calamari installation.

it fails on new installs

History

#1 Updated by karan singh about 6 years ago

To get more information on this issue visit https://github.com/ceph/calamari/issues/308

A temporary fix is to comment update_connected_minions() line in https://github.com/ceph/calamari/commit/97c4270b2ed09c481558f7a033dc402de8a4142f

Expected : Permanent fix in upstream.

#2 Updated by Özhan Karaman about 6 years ago

Hi;
I tested the fix and it did not work. I used the compiled server and client files from new http://download.ceph.com/calamari/devel/ site and latest git repository. I think code still needs fix, temporary fix looks like does not work. My server is Ubuntu 14.04.02 with latest updates.

Thanks
Özhan

#3 Updated by Stefan Lissmats about 6 years ago

I have the same environment as in the github comment and after commenting the line as karan suggests then the "calamari-ctl initialize" commands runs ok but after logging to calamari i get error 500, not sure if this is related or something other?

#4 Updated by Felix Barbeira about 6 years ago

Same error here with ubuntu 14 LTS and the packages from the download.ceph.com/calamari/devel repo.

#6 Updated by abouzar parvan almost 6 years ago

i've got the same issue on ubuntu 14.04

but this helped me fix the problem temporarily

in file: [cthulhu/cthulhu/calamari_ctl.py]

/opt/calamari/venv/local/lib/python2.7/site-packages/calamari_cthulhu-0.1-py2.7.egg/cthulhu/calamari_ctl.py

if len(Key(master_config(config.get('cthulhu', 'salt_config_path'))).list_keys()['minions']) == 0:
# no minions to update
- return
try:
if master_config(config.get('cthulhu', 'salt_config_path')) is not None:
+ pass
+ else:
+ log.info("master_config issue happend!")
except TypeError as err:
log.debug(err)
+ return

#7 Updated by Christina Meno almost 6 years ago

Thank you for the suggestion.
Would you please help me understand it?

I agree that this condition could be more readable and I am concerned that you've changed the expression substantially without explain what is wrong.

The previous condition was something like:
1. find out where the config_path is
2. parse it
3. coerce it to type Key
4. fetch attribute.list_keys
5. get element 'minions'
6. compare the number of minions to 0

Your replacement reads:
1. find out where the config_path is
2. parse it

Then log an opaque error when your code fails to parse or find the config.

What setup does your code survive?

#8 Updated by Christina Meno almost 6 years ago

  • Status changed from New to In Progress
  • Target version changed from 1.4 backlog to 1.3.1

[gmeno@brown-thrasher calamari]$ git branch -r --contains 1d16be88aa6e672a4e7825 | grep -v wip
origin/1.3
origin/master

#9 Updated by abouzar parvan almost 6 years ago

I’ve tried to work with calamari in Ubuntu 14.04 system and the problem was that sometimes
config.get('cthulhu', 'salt_config_path')
Had no value and sometimes
master_config(config.get('cthulhu', 'salt_config_path'))
Was not null , so I’ve tried to overcome this problem by trying to parse it and if some error happened returning nothing

#10 Updated by Christina Meno almost 6 years ago

abouzar parvan,

I am unable to reproduce these config errors on ubuntu 1404.
Is this a devmode instance? packaged install?
What else can you tell me about this issue?

#11 Updated by abouzar parvan almost 6 years ago

Gregory Meno,

it was a setup according to http://calamari.readthedocs.org/en/latest/operations/server_install.html
but i've used the apt version of salt-master and probably that was what caused the problem, anyway i've compiled my own version of calamari-server and calamari-client and installed 2014.7 version of salt and now everything runs smoothly. so i'm not sure that the problem was caused by salt-master's version or the change in code!

#12 Updated by Christina Meno almost 6 years ago

  • Status changed from In Progress to Can't reproduce

Thank you for following up. I will close this ticket. Feel free to re-open if this issue occurs again.

Also available in: Atom PDF