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

Failure provisioning OSX 10.11 #390

Closed
edunham opened this issue Jun 2, 2016 · 5 comments
Closed

Failure provisioning OSX 10.11 #390

edunham opened this issue Jun 2, 2016 · 5 comments

Comments

@edunham
Copy link
Contributor

@edunham edunham commented Jun 2, 2016

I'm setting up mac1 and get several Salt errors of the form:

----------
          ID: virtualenv
    Function: pip.installed
      Result: False
     Comment: An exception occurred in this state: Traceback (most recent call last):
                File "/usr/local/Cellar/saltstack/2015.5.5_1/libexec/lib/python2.7/site-packages/salt/state.py", line 1561, in call
                  **cdata['kwargs'])
                File "/usr/local/Cellar/saltstack/2015.5.5_1/libexec/lib/python2.7/site-packages/salt/states/pip_state.py", line 535, in installed
                  out = _check_pkg_version_format(pkg)
                File "/usr/local/Cellar/saltstack/2015.5.5_1/libexec/lib/python2.7/site-packages/salt/states/pip_state.py", line 159, in _check_pkg_version_format
                  ret['prefix'] = install_req.req.project_name
              AttributeError: 'Requirement' object has no attribute 'project_name'
     Started: 16:44:52.161538
    Duration: 1.884 ms
     Changes: 

The master currently reports its salt version as 2015.5.2 and mac1 got salt 2015.5.5 when I followed the usual process, though they should be compatible with one another.

@aneeshusa, any idea whether our states are wrong or we've hit a Salt bug?

@aneeshusa
Copy link
Member

@aneeshusa aneeshusa commented Jun 3, 2016

This was caused by pip changing their internal API (which does not have any stability guarantees); Salt was directly interacting with said API. See pypa/pip#3673 for the issue.

This has been fixed in Salt upstream, but I doubt that it will be backported to our relatively ancient version of Salt. I can think of a few ways to fix this in the short term:

  • Backport the updated module ourself. Requires #350.
  • Pin the pip package itself; this may or may not be possible, I'll have to look into it.

A better long term fix would be to update our Salt version.

For future robustness, I think a combination of #382 and #376 would have caught this earlier.

I'll look into this a little more.

@aneeshusa
Copy link
Member

@aneeshusa aneeshusa commented Jun 3, 2016

I checked on servo-mac1 and it seems pip is indeed version 8.1.2 (installed via Homebrew). However, the Homebrew formula a) hasn't been updated since April and b) purports to install pip 8.0.2.

@edunham You refreshed servo-mac1 more recently than April and pip/virtualenv installed fine, right? If that's the case, I'm not sure why pip 8.1.2 is installed and how it got there.

@aneeshusa
Copy link
Member

@aneeshusa aneeshusa commented Jun 3, 2016

Update: I tried pip install 'pip == 8.1.1' and it seems to have installed OK on servo-mac1 - can you try provisioning again? If this works, I can make a PR to pin the version.

@edunham
Copy link
Contributor Author

@edunham edunham commented Jun 6, 2016

@aneeshusa Thanks for tracking that down! We paved mac1 within the past 2 weeks, so the problem with the formula is on Homebrew's side.

I get the same Salt failures with pip 8.0.2 and 7.1.2 on the minion, so I'll focus on getting our Salt version updated as the best direction toward fixing this for now.

@aneeshusa
Copy link
Member

@aneeshusa aneeshusa commented Sep 7, 2016

Fixed in #350. I just tried a test=True highstate and I'm not seeing this anymore.

@aneeshusa aneeshusa closed this Sep 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.