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

state pkg won't install package nscd #875

Closed
dhoffutt opened this issue Mar 9, 2012 · 10 comments
Closed

state pkg won't install package nscd #875

dhoffutt opened this issue Mar 9, 2012 · 10 comments
Milestone

Comments

@dhoffutt
Copy link

dhoffutt commented Mar 9, 2012

CentOS 6.1; Salt 0.9.7

Have created this salt file:

    pam_ldap:
      pkg:
        - installed
        - order: 1
    openldap-clients:
      pkg:
        - installed
        - order: 2
    openldap:
      pkg:
        - installed
        - order: 3
    nscd:
      pkg:
        - installed
        - order: 4
    nss-pam-ldapd:
      pkg:
        - installed
        - order: 5
    authconfig:
      pkg:
        - installed
        - order: 6

Running this works great until it reaches installing package nscd. On the minion, running "salt-call -l debug state.highstate" produces this:

    local:
    ----------
        State: - pkg
        Name:      nscd
        Function:  installed
            Result:    False
            Comment:   Package nscd failed to install
            Changes:

The log_level was set to debug on the minion, and shows this:

[INFO    ] Executing state pkg.installed for nscd
Loaded plugins: fastestmirror
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: centos.mirror.nac.net
 * epel: mirror.cc.columbia.edu
 * extras: mirrors.adams.net
 * updates: mirror.trouble-free.net
Running rpm_check_debug
[ERROR   ] No changes made for nscd
[ERROR   ] No changes made for nscd
[INFO    ] Loading fresh modules for stat

Saying "No changes for nscd" might lead one to believe it's already installed and up-to-date, but it was not installed yet. Have been playing with this for half a day using VMs and restoring a sane snapshot. It performs in this same manner every single time.

Further, I had been counting on nss-pam-ldapd package to install nscd as a prerequisite - though no error was thrown when doing it this way, nscd never installed as a result either - so that's why I have been trying to explicitly install nscd with its own state entry.

Thank you!

@SEJeff
Copy link
Contributor

SEJeff commented Mar 9, 2012

Can you try salt-call -l debug pkg.install nscd and paste the results please?

@dhoffutt
Copy link
Author

dhoffutt commented Mar 9, 2012

Oops - failed to mention:

Running yum install -y nscd works flawlessly - so it isn't an issue with the RPM, I would think...

@dhoffutt
Copy link
Author

dhoffutt commented Mar 9, 2012

Yessir:

[root@cent6-1 ~]# salt-call -l debug pkg.install nscd
[DEBUG   ] Failed to import module mysql, this is most likely NOT a problem: No module named MySQLdb
[DEBUG   ] Failed to import module virt, this is most likely NOT a problem: No module named libvirt
[DEBUG   ] Failed to import module ps, this is most likely NOT a problem: No module named psutil
[DEBUG   ] Failed to import module kvm_hyper, this is most likely NOT a problem: No module named libvirt
[DEBUG   ] Failed to import module mongo_return, this is most likely NOT a problem: No module named pymongo
[DEBUG   ] Failed to import module redis_return, this is most likely NOT a problem: No module named redis
[DEBUG   ] Failed to import module cassandra_return, this is most likely NOT a problem: No module named pycassa
[DEBUG   ] Failed to import module json_mako, this is most likely NOT a problem: No module named mako.template
[DEBUG   ] Failed to import module yaml_mako, this is most likely NOT a problem: No module named mako.template
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.wiredtree.com
 * epel: dl.fedoraproject.org
 * extras: mirrors.adams.net
 * updates: mirror-la.7x24web.net
Running rpm_check_debug
{'local': {}}
[root@cent6-1 ~]# rpm -qa|grep nscd
[root@cent6-1 ~]#

Also, thought I would include what happens if I run yum manually (I can restore VM snapshot to return to previous state):

[root@cent6-1 ~]# yum install -y nscd
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.wiredtree.com
 * epel: dl.fedoraproject.org
 * extras: mirrors.adams.net
 * updates: mirror-la.7x24web.net
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package nscd.i686 0:2.12-1.47.el6_2.5 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

=======================================================================================================================================================================
 Package                             Arch                                Version                                          Repository                              Size
=======================================================================================================================================================================
Installing:
 nscd                                i686                                2.12-1.47.el6_2.5                                updates                                202 k

Transaction Summary
=======================================================================================================================================================================
Install       1 Package(s)
Upgrade       0 Package(s)

Total download size: 202 k
Installed size: 157 k
Downloading Packages:
nscd-2.12-1.47.el6_2.5.i686.rpm                                                                                                                 | 202 kB     00:01     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : nscd-2.12-1.47.el6_2.5.i686                                                                                                                     1/1 

Installed:
  nscd.i686 0:2.12-1.47.el6_2.5                                                                                                                                        

Complete!

@thatch45
Copy link
Contributor

Thanks for the info, I am going to bump this up to 0.9.8 and try to reproduce it.

@thatch45
Copy link
Contributor

This is clearly an issue in the yumpkg module, by using the new provider interface coming in 0.9.8 and changing to use yumpkg5 it installs without issue

hopefully I will have a solution soon

@thatch45
Copy link
Contributor

getting closer

import yum
yb = yum.YumBase()
yb.install(name='nscd')
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile

  • base: linux.mirrors.es.net
  • epel: mirror.chpc.utah.edu
  • extras: mirror.stanford.edu
  • updates: mirrors.kernel.org
    [<TransactionMember : nscd.x86_64 0:2.12-1.47.el6_2.9 - u (0x3511488)>]
    yb.resolveDeps()
    (2, [u'Success - deps resolved'])
    yb.processTransaction()
    Running rpm_check_debug
    Error in PREIN scriptlet in rpm package nscd-2.12-1.47.el6_2.9.x86_64
    /var/tmp/rpm-tmp.Dror0l: line 1: /usr/sbin/groupadd: Permission denied
    /var/tmp/rpm-tmp.Dror0l: line 3: /usr/sbin/useradd: Permission denied
    error: %pre(nscd-2.12-1.47.el6_2.9.x86_64) scriptlet failed, exit status 126
    error: install: %pre scriptlet failed (2), skipping nscd-2.12-1.47.el6_2.9

@epoelke
Copy link
Contributor

epoelke commented Mar 17, 2012

This seems to work fine on my EL6 boxes, I do have SELinux disabled however. And I see bugs that existed around SELinux related to similar issues. I will re-enabled SELinux and do some more testing. Do you know what SELinux is set to on the systems that you have seem this on?

@epoelke
Copy link
Contributor

epoelke commented Mar 17, 2012

FYI -

[root@qe1dss01 ~]# uname -a
Linux qe1dss01.qe1.heartflow.net 2.6.32-131.0.15.el6.x86_64 #1 SMP Sat Nov 12 15:11:58 CST 2011 x86_64 x86_64 x86_64 GNU/Linux
[root@qe1dss01 ~]# cat /etc/redhat-release 
CentOS release 6.2 (Final)
[root@qe1dss01 ~]# python
Python 2.6.6 (r266:84292, Dec  7 2011, 20:48:22) 
[GCC 4.4.6 20110731 (Red Hat 4.4.6-3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import yum
>>> yb = yum.YumBase()
>>> yb.install(name='nscd')
Loaded plugins: presto, versionlock
[<TransactionMember : nscd.x86_64 0:2.12-1.47.el6_2.5 - u (0x211b3b0)>]
>>> yb.resolveDeps()
(2, [u'Success - deps resolved'])
>>> yb.processTransaction()
Setting up and reading Presto delta metadata
Processing delta metadata
Package(s) data still to download: 203 k
Running rpm_check_debug
Installing: nscd-2.12-1.47.el6_2.5.x86_64 2272/167516 [1/1]
Installing: nscd-2.12-1.47.el6_2.5.x86_64 4923/167516 [1/1]
Installing: nscd-2.12-1.47.el6_2.5.x86_64 70588/167516 [1/1]
Installing: nscd-2.12-1.47.el6_2.5.x86_64 136124/167516 [1/1]
Installing: nscd-2.12-1.47.el6_2.5.x86_64 167140/167516 [1/1]
Installing: nscd-2.12-1.47.el6_2.5.x86_64 167264/167516 [1/1]
Installing: nscd-2.12-1.47.el6_2.5.x86_64 167392/167516 [1/1]
Installing: nscd-2.12-1.47.el6_2.5.x86_64 167516/167516 [1/1]
>>> 

I don't have a 6.1 box anymore. Also SELinux is set to permissive on this box at the moment.

@thatch45
Copy link
Contributor

Aha! I do have SELinux set to enforcing, Salt must be running under a restricted context! Thanks for looking, I should have thought of this. Actually, I am surprised that Salt as worked as well as it has with SELinux on Enforcing.

When set to permissive mode nscd installs without issue.

I will figure out what we need to change

@thatch45
Copy link
Contributor

It has been too long since I have worked a lot with SELinux, I am going to close this ticket based on the fact that we do not yet have Salt fully supported under SELinux

jacobhammons added a commit to jacobhammons/salt that referenced this issue Aug 29, 2016
… docs.saltstack.com. This re-enables incremental builds.

Adds notes to OS X page that Salt master on OS X is not officially supported
Adds note to postgres returners to cross-link modules with usage explanation (ZD saltstack#875)
Adds example showing how to enable tcp transport
rallytime pushed a commit that referenced this issue Aug 31, 2016
…oc updates (#35865)

* Updates doc builds to generate build timestamp only when building for docs.saltstack.com. This re-enables incremental builds.
Adds notes to OS X page that Salt master on OS X is not officially supported
Adds note to postgres returners to cross-link modules with usage explanation (ZD #875)
Adds example showing how to enable tcp transport

* Generate copyright date
Footer updates
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants