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

Windows file/repo access broken in 2014.1.0 AMD64? #10894

Closed
wmbaum opened this issue Mar 3, 2014 · 7 comments
Closed

Windows file/repo access broken in 2014.1.0 AMD64? #10894

wmbaum opened this issue Mar 3, 2014 · 7 comments
Assignees
Labels
Bug broken, incorrect, or confusing behavior Platform Relates to OS, containers, platform-based utilities like FS, system based apps severity-high 2nd top severity, seen by most users, causes major problems severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around Windows

Comments

@wmbaum
Copy link

wmbaum commented Mar 3, 2014

Was beating my head against the wall trying to figure out why my windows minions were unable to access anything from the repository. As a test, on one minion ('winold' below), I uninstalled Salt-Minion-2014.1.0-AMD64 and installed Salt-Minion-0.17.5-2-AMD64, and sure enough, it is able to access the repo, install packages, etc..

# salt -L 'winold,winnew' grains.item saltversion os osfullname osrelease
winnew:
  os: Windows
  osfullname: Microsoft Windows 7 Enterprise
  osrelease: 7
  saltversion: 2014.1.0-5-g32d3463
winold:
  os: Windows
  osfullname: Microsoft Windows Server 2008 R2 Standard
  osrelease: 2008ServerR2
  saltversion: 0.17.5-52-g2d4772c

# salt -L 'winold,winnew' cp.get_file_str salt://filetest
winold:
    #hello?

winnew:
    The minion function caused an exception: Traceback (most recent call last):
      File "salt/minion.py", line 768, in _thread_return
      File "salt/modules/cp.py", line 282, in get_file_str
      File "salt/utils/__init__.py", line 1037, in fopen
    IOError: [Errno 22] invalid mode ('r') or filename: ''

# salt -L 'winold,winnew' pkg.refresh_db 
winnew:
    True
winold:
    True

'winnew' C:\salt\var\log\salt\minion :

2014-03-02 21:22:34,112 [salt.fileclient  ][DEBUG   ] Fetching file from saltenv 'base', ** attempting ** 'salt://filetest'
2014-03-02 21:22:34,117 [salt.loaded.int.module.cp][ERROR   ] Unable to cache file 'salt://filetest' from saltenv 'base'.
2014-03-02 21:22:34,118 [salt.minion      ][WARNING ] The minion function caused an exception
Traceback (most recent call last):
  File "salt/minion.py", line 768, in _thread_return
  File "salt/modules/cp.py", line 282, in get_file_str
  File "salt/utils/__init__.py", line 1037, in fopen
IOError: [Errno 22] invalid mode ('r') or filename: ''
....
2014-03-02 21:23:22,134 [salt.fileclient  ][DEBUG   ] Fetching file from saltenv 'base', ** attempting ** 'salt://win/repo/winrepo.p'
2014-03-02 21:23:22,149 [salt.loaded.int.module.cp][ERROR   ] Unable to cache file 'salt://win/repo/winrepo.p' from saltenv 'base'.
@UtahDave UtahDave self-assigned this Mar 3, 2014
@UtahDave
Copy link
Contributor

UtahDave commented Mar 3, 2014

Thanks for the info! I'll look into this today.

@basepi
Copy link
Contributor

basepi commented Mar 4, 2014

@wmbaum What master version are you using? For a 2014.1.0 minion, you must also have a 2014.1.0 master.

@wmbaum
Copy link
Author

wmbaum commented Mar 5, 2014

sorry for the delay.. notification glitch..
Wow.. Yes -- that seems to have been the problem. I'm surprised at the version conflict as I installed the stable released versions of everything at the same time.

It looks like the 2014.1.0 windows minion was published 2014-02-25, more than a week earlier than the Ubuntu Precise packages in the ppa on 2014-03-04.

Lucky me, I installed everything on 2014-03-02, so I got mismatched versions.. Perhaps a note about potential version conflicts is in order for the windows download page?

@basepi
Copy link
Contributor

basepi commented Mar 5, 2014

The Ubuntu packages were fairly slow this time around, as our packager was super busy at the time. Generally that's not as much of an issue. We'll try to notify on future backwards incompatibilities.

@basepi basepi closed this as completed Mar 5, 2014
@garthk
Copy link

garthk commented Apr 22, 2014

Note to people searching on this error running 2014.1.3 or later on both master and minion:

Unable to cache file 'salt://win/repo/winrepo.p' from saltenv 'base'

I'm not sure if the problem is with the behaviour, the documentation, or our understanding, but the temporary workaround is to point win_repo and win_repo_mastercachefile into a subdirectory of one of the file_roots. I chose my /srv/salt/dist fallback:

win_repo: /srv/salt/dist/win/repo
win_repo_mastercachefile: /srv/salt/dist/win/repo/winrepo.p

@andrejohansson
Copy link

To add to @garthk s comment, I had made another mistake. When I started to use GitFS I selected only that in my master config as fileserver backends:

fileserver_backend:
  - git

But since the winrepo is placed in the "file_root" directory, you still need to use file roots at the same time as gitfs when you have winrepos. Otherwise the repo file won't be available via salt:// protocol (even if I pointed out the location).

So, change it back to:

fileserver_backend:
  - git
  - roots

@UtahDave , this should maybe be clarified in the documentation for GitFS as well as the winrepo?

@ameneau
Copy link
Contributor

ameneau commented Apr 21, 2015

+1 to this bug. If it wasn't for @garthk 's comment, I'd still be struggling to figure out how to get the win_repo working properly.

@jfindlay jfindlay added the Platform Relates to OS, containers, platform-based utilities like FS, system based apps label May 26, 2015
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 Platform Relates to OS, containers, platform-based utilities like FS, system based apps severity-high 2nd top severity, seen by most users, causes major problems severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around Windows
Projects
None yet
Development

No branches or pull requests

7 participants