Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

not working with salt-cloud shows unknown locale error #26063

Closed
saltstack-bot opened this issue Aug 6, 2015 · 12 comments
Closed

not working with salt-cloud shows unknown locale error #26063

saltstack-bot opened this issue Aug 6, 2015 · 12 comments
Labels
Bug broken, incorrect, or confusing behavior Core relates to code central or existential to Salt fixed-pls-verify fix is linked, bug author to confirm fix P1 Priority 1 RIoT Relates to integration with cloud providers, hypervisors, API-based services, etc. Salt-Cloud severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around
Milestone

Comments

@saltstack-bot
Copy link

Issue by AmitChotaliya
Wed Aug 5 15:03:57 2015
Originally opened as saltstack/salt-bootstrap#645


I am using salt-cloud to create instances and passing a specific version for salt-minion as script argument.

staging2-frontline:
  provider: aws
  image: ami-408c7f28
  size: m1.small
  securitygroup:
    - Staging-Global
    - Staging-FrontLine
  tag:
      circle: staging2
      type: frontline
  script: bootstrap-salt
  script_args: stable 2015.5

I am getting the following error.

* ERROR: salt-minion was not found running
 * ERROR: Failed to run daemons_running()!!!
nohup: ignoring input
Traceback (most recent call last):
  File "/usr/bin/salt-minion", line 6, in <module>
    from salt.scripts import salt_minion
  File "/usr/lib/python2.7/dist-packages/salt/__init__.py", line 68, in <module>
    __define_global_system_encoding_variable__()
  File "/usr/lib/python2.7/dist-packages/salt/__init__.py", line 42, in __define_global_system_encoding_variable__
    encoding = locale.getdefaultlocale()[-1]
  File "/usr/lib/python2.7/locale.py", line 543, in getdefaultlocale
    return _parse_localename(localename)
  File "/usr/lib/python2.7/locale.py", line 475, in _parse_localename
    raise ValueError, 'unknown locale: %s' % localename
ValueError: unknown locale: UTF-8
 * DEBUG: Running salt-minion by hand outputs:
 * DEBUG: DAEMON LOGS for minion:
 * DEBUG: 2015-08-05 14:57:47,477 [salt.cli.daemons ][INFO    ][4367] SeConnection to 10.170.64.36 closed.
tting up the Salt Minion "scrap2"
2015-08-05 14:57:48,624 [salt.minion      ][ERROR   ][4367] Invalid keyword 'str' for variable 'master_type'
2015-08-05 14:57:48,651 [salt.cli.daemons ][INFO    ][4367] The salt minion is shut down
2015-08-05 14:58:00,985 [salt.cli.daemons ][INFO    ][4414] Setting up the Salt Minion "scrap2"
2015-08-05 14:58:01,921 [salt.minion      ][ERROR   ][4414] Invalid keyword 'str' for variable 'master_type'
2015-08-05 14:58:01,922 [salt.cli.daemons ][INFO    ][4414] The salt minion is shut down
@saltstack-bot
Copy link
Author

Comment by AmitChotaliya
Thu Aug 6 04:57:15 2015


I even tried without passing any script args and it still does not work. I used it without passing any script args a month back It worked then.

@AmitChotaliya
Copy link
Contributor

I added the following in /usr/lib/python2.7/dist-packages/salt/cloud/deploy/bootstrap-salt.sh

export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8

It worked

@s0undt3ch
Copy link
Collaborator

This system had a badly configured locale. I moved the issue to salt because salt needs to better handle these cases.

@AmitChotaliya
Copy link
Contributor

I don't know if that is the problem. It was working last month with same AWS ami and same salt configuration.

s0undt3ch added a commit to s0undt3ch/salt that referenced this issue Aug 6, 2015
@s0undt3ch
Copy link
Collaborator

What version of salt were you trying to bootstrap then?

@AmitChotaliya
Copy link
Contributor

Without script_args so I guess default

@s0undt3ch
Copy link
Collaborator

Hmm, that's weird because about a month ago the stable salt release would be(and still is) from the 2015.5 branch which already has this code. Maybe something in the AMI changed?

@rallytime
Copy link
Contributor

I think this is another case of the master_type: str bug that exists on 2015.5.3 (which is the latest stable release right now). I saw this line if your original logs:
`2015-08-05 14:58:01,921 [salt.minion ][ERROR ][4414] Invalid keyword 'str' for variable 'master_type'
This bug was originally reported in #25335 and has been fixed at the HEAD of the 2015.5 branch with #25703. This regression will be fixed in the next release, 2015.5.4. However, that means that this bootstrapping a minion from salt-cloud like you're trying to do here won't work on 2015.5.3.

@rallytime rallytime added Bug broken, incorrect, or confusing behavior severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around fixed-pls-verify fix is linked, bug author to confirm fix Salt-Cloud Core relates to code central or existential to Salt P1 Priority 1 RIoT Relates to integration with cloud providers, hypervisors, API-based services, etc. labels Aug 6, 2015
@rallytime rallytime added this to the Approved milestone Aug 6, 2015
@rallytime
Copy link
Contributor

I should have said in my previous comment that apart from the locale issue that @s0undt3ch has address in the pull request above, the other issue in this thread is the master_type: str.

@s0undt3ch
Copy link
Collaborator

My PR regarding the locale was merged. @rallytime want to keep this one open because of the master_type: str?

@rallytime
Copy link
Contributor

@s0undt3ch I think it's fine to close. The bug has been fixed. We just need to release the code that has the fix (2015.5.4). Is ok with you @AmitChotaliya?

@AmitChotaliya
Copy link
Contributor

Yes, I already have a workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior Core relates to code central or existential to Salt fixed-pls-verify fix is linked, bug author to confirm fix P1 Priority 1 RIoT Relates to integration with cloud providers, hypervisors, API-based services, etc. Salt-Cloud severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around
Projects
None yet
Development

No branches or pull requests

4 participants