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

2014.7.5 - Windows - pkg.list_pkgs - "nxlog" never shows up in output. #23004

Closed
keesats opened this issue Apr 24, 2015 · 11 comments
Closed

2014.7.5 - Windows - pkg.list_pkgs - "nxlog" never shows up in output. #23004

keesats opened this issue Apr 24, 2015 · 11 comments
Labels
Bug broken, incorrect, or confusing behavior P3 Priority 3 Platform Relates to OS, containers, platform-based utilities like FS, system based apps severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around Windows
Milestone

Comments

@keesats
Copy link

keesats commented Apr 24, 2015

Salt-Master: 2014.7.5 - Ubuntu 14.04 LTS
Salt-Minion: 2014.7.5 - Windows Server 2008 R2 Enterprise

NXLog is an x86 application that runs on both x86 & AMD64 Windows Server platforms that parses log messages and sends to a syslog server. I'm trying to utilize SaltStack's Windows repo feature to manage this application on my minions to keep it & its related configuration up to date. When I run..

salt 'myserver' pkg.refresh_db
salt 'myserver' pkg.list_pkgs

I get output such as...

SQL Server 2008 R2 Client Tools:
    10.50.1600.1
SQL Server 2008 R2 Common Files:
    10.50.1600.1
SQL Server 2008 R2 Database Engine Services:
    10.50.1600.1

...with my packages listed, except that NXLog-CE NEVER shows up. The only thing that I can think of is the fact that it's an x86 package on an AMD64 cpuarch system, possibly causing the issue. I've got NXLog (version 2.9.1347) running on lots of Windows systems, and it does not show up in the pkg.list_pkgs output for any of these systems (all Server 2008).

In regards to the actual SaltStack setup on my master, my SLS for this package looks as follows for the moment:

nxlog:
  2.9.1347:
    installer: '/srv/salt/win/repo/nxlog/files/nxlog-ce-2.9.1347.msi'
    full_name:  'NXLog-CE'
    reboot: False
    install_flags: '/quiet /norestart'
    msiexec: True
    uninstaller: '/srv/salt/win/repo/nxlog/files/nxlog-ce-2.9.1347.msi'
    uninstall_flags: '/quiet /norestart'

I have confirmed that running "nxlog.msi /quiet /norestart" runs successfully on the server. When I try to run:

salt 'myserver' pkg.install 'nxlog'

I get the following:

myserver:
    ----------

The last thing of note that is that my salt-minion's log file is completely empty, so I don't see anything relevant there. Also, uninstalled/reinstalled the package, all that good stuff - to no avail. I'm just curious if I'm doing something incorrectly (very possible), or if this is a bug of some sort. Thanks!

@keesats keesats changed the title 2014.7.5 - pkg.list_pkgs - "nxlog" never shows up in output. 2014.7.5 - Windows - pkg.list_pkgs - "nxlog" never shows up in output. Apr 24, 2015
@rallytime rallytime added Bug broken, incorrect, or confusing behavior severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around Windows P3 Priority 3 labels Apr 24, 2015
@rallytime rallytime added this to the Approved milestone Apr 24, 2015
@rallytime
Copy link
Contributor

@b18 Offhand, I don't see anything here that looks like you're doing anything wrong. I don't know the windows code very well, but I bet your intuition is correct. There might be a bug in win_pkg that where we're not looking for x86 packages on an AMD64 machine, though I don't know for sure if that is the problem.

@twangboy and @UtahDave: Have either of you com across this before?

@twangboy
Copy link
Contributor

Your installer and uninstaller paths look strange to me. The path doesn't correctly resolve in windows. The windows software repository is /srv/salt/win/repo. You put all your installation files in that directory. The minion doesn't see that directory. To reference that in your sls file, use "salt://". That tells the minion that it's in the master's windows repository. You can also point to a file on the internet using the url.

So instead of:

installer: '/srv/salt/win/repo/nxlog/files/nxlog-ce-2.9.1347.msi'

you should have something like:

installer: 'salt://nxlog/files/nxlog-ce-2.9.1347.msi'

The same would apply for the uninstall path.

See the documentation for more examples: http://docs.saltstack.com/en/latest/topics/windows/windows-package-manager.html#usage

Let me know if this helps.

@keesats
Copy link
Author

keesats commented Apr 24, 2015

Yep, you're absolutely correct on that. I'll fix up my SLS file. That being said, even with the software installed and not having a winrepo SLS in play, just a list.pkgs still never shows the software installed on the minion.

Thanks!

@dariusjs
Copy link

dariusjs commented May 8, 2015

@b18 I have NXLOG listed correctly on my winrepo

salt hostname pkg.get_repo_data
    repo:
        ----------
        NXLOG-CE:
            ----------
            2.8.1248:
                ----------
                full_name:
                    Nxlog CE 2.8.1248
                install_flags:
                     /quiet /norestart
                installer:
                    salt://win/repo/NXLOG-CE/nxlog-ce-2.8.1248.msi
                locale:
                    en_US
                msiexec:
                    True
                reboot:
                    False
                uninstaller:
                     /uninstall /quiet /norestart

I have queried some boxes I have where nxlog was installed through another non-salt method and it shows up as this which is why I called everything NXLOG-CE as I am using the community version.

salt -v -t 180 some_other_host pkg.list_pkgs
    NXLOG-CE:
        2.7.1191

I also seem to be getting the same problem as you:

[root@salt-master NXLOG-CE]# salt some_minion pkg.install NXLOG-CE
some_minion:
    ----------
[root@salt-master NXLOG-CE]#

@dariusjs
Copy link

dariusjs commented May 8, 2015

After some further investigation I suspect there are just bugs across various versions. I've got multiple different versions of minions across the data center. 2014.1.0, 2014.7.0 2014.7.1 and 2014.7.5 is the latest which it seems i need to upgrade to. When I upgraded the minions that had issues to 2014.7.5 then I was able to install NXLOG correctly, it doesnt show up in output

[root@sahsalt9358 NXLOG-CE]# salt 'SAHAXWD9622*' pkg.install 'NXLOG-CE'
SAHAXWD9622:
    ----------
    SSC Serv 3.5.0 Free Edition:
        ----------
        new:
        old:
            3.5.0
    Salt Minion 2014.7.5:
        ----------
        new:
        old:
            2014.7.5
    salt:
        ----------
        new:
            2014.7.5
        old:
    sscserv:
        ----------
        new:
            3.5.0
        old:
[root@sahsalt9358 NXLOG-CE]#

NXLog also doesnt show up:

[root@salt-master NXLOG-CE]# salt some-minion pkg.list_pkgs
some-minion:
    ----------
    Microsoft Visual C++ 2008 Redistributable - x64 9.0.30729.6161:
        9.0.30729.6161
    Microsoft Visual C++ 2008 Redistributable - x86 9.0.30729.4148:
        9.0.30729.4148
    Microsoft Visual C++ 2008 Redistributable - x86 9.0.30729.6161:
        9.0.30729.6161
    Notepad++:
        6.7.4
    VMware Tools:
        9.4.10.2068191
    salt:
        2014.7.5
    sscserv:
        3.5.0
[root@salt-master NXLOG-CE]#

A 2014.1.0 minion lists NXLOG correctly:

[root@salt-master NXLOG-CE]# salt some-minion2  grains.item saltversion
some-minion2:
    ----------
    saltversion:
        2014.1.10

[root@salt-master NXLOG-CE]# salt some-minion2 pkg.list_pkgs
some-minion2:
----------
    NXLOG-CE:
        2.7.1191

@twangboy
Copy link
Contributor

twangboy commented May 8, 2015

Thanks for all the work you've done hunting this down.

I believe the patch I submitted yesterday should fix the problem with nxlog not showing up properly.
#23433

I just tested it on my 32bit test minion. nxlog shows up whether it was installed via salt, administrator, or another user. It's a pretty big change so I need to have more eyes on it before it gets merged.

@dariusjs
Copy link

dariusjs commented May 8, 2015

No problem, glad to help with more bugreports. Thanks for pointing out the patch report, next time I will look further for patch submissions. I was actually looking into something completely different and thought I would contribute to what @b18 was experiencing.

@keesats
Copy link
Author

keesats commented May 9, 2015

Nice @dariusjs ! - I was in the process of implementing some logging stuff and trying to simplify the management of NXLog across hundreds of systems. Thanks to everyone for the help!

@dariusjs
Copy link

dariusjs commented May 9, 2015

@b18, look through my gist GitHub for further examples of you need them. I've got a windows nxlog config and sending all of that to logstash/ELK stack. https://gist.github.com/dariusjs I haven't gotten around to trying to write a module as i am doing everything through state files and pillars so not doing anything too fancy. I can put those up if you need them on Monday.

@jfindlay jfindlay added the Platform Relates to OS, containers, platform-based utilities like FS, system based apps label May 26, 2015
@twangboy
Copy link
Contributor

#23433 was merged on May 11. The fix should be included in 2014.7.6 and 2015.5.1+. Please let me know if the issue is NOT resolved. I am closing this ticket.

@keesats
Copy link
Author

keesats commented Jun 27, 2015

Thanks for the assistance!

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 P3 Priority 3 Platform Relates to OS, containers, platform-based utilities like FS, system based apps severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around Windows
Projects
None yet
Development

No branches or pull requests

5 participants