Discussion:
[salt-users] Can't able to install a package (glusterfs) on minions using saltstack
o***@fractalio.com
2014-10-27 06:50:14 UTC
Permalink
Hi all,

Am trying to install rpm packages on minions using salt.
I succeeded for "smartmontools" package but its not working for "glusterfs"
pacakges.
I tried to change the name "glusterfs " to "glusterfs-3.5" but not working.

All I want is to install all the glusterfs-* packages by salt on the
minions by resolving dependencies.

OS: Centos 6.5

File : /srv/salt/fr.sls

fractalpkgs:
pkgrepo.managed:
- humanname: Fractal Packages
- baseurl: http://xxx.xxx.x.xxx/fractallocal

glusterfs:
pkg.installed:
- fromrepo: Fractal Packages
- skip_verify: True
- refresh: True

smartmontools:
pkg.installed:
- fromrepo: Fractal Packages
- skip_verify: True
- refresh: True

*******************

yum repo: /var/www/html/fracatallocal/

glusterfs-3.5.2-1.el6.x86_64.rpm
glusterfs-api-3.5.2-1.el6.x86_64.rpm
glusterfs-cli-3.5.2-1.el6.x86_64.rpm
glusterfs-fuse-3.5.2-1.el6.x86_64.rpm
glusterfs-libs-3.5.2-1.el6.x86_64.rpm
glusterfs-server-3.5.2-1.el6.x86_64.rpm
ipmitool-1.8.11-16.el6.x86_64.rpm
lm_sensors-libs-3.1.1-17.el6.x86_64.rpm
mailx-12.4-7.el6.x86_64.rpm
net-snmp-libs-5.5-49.el6_5.4.x86_64.rpm
OpenIPMI-2.0.16-14.el6.x86_64.rpm
OpenIPMI-libs-2.0.16-14.el6.x86_64.rpm
perl-5.10.1-136.el6.x86_64.rpm
perl-libs-5.10.1-136.el6.x86_64.rpm
perl-Module-Pluggable-3.90-136.el6.x86_64.rpm
perl-Pod-Escapes-1.04-136.el6.x86_64.rpm
perl-Pod-Simple-3.13-136.el6.x86_64.rpm
perl-version-0.77-136.el6.x86_64.rpm
repodata
smartmontools-5.43-1.el6.x86_64.rpm

***************************************
--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Diep Pham
2014-10-27 07:05:47 UTC
Permalink
Post by o***@fractalio.com
I succeeded for "smartmontools" package but its not working for "glusterfs"
pacakges.
Please post the errors you got.
--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
o***@fractalio.com
2014-10-27 07:12:09 UTC
Permalink
When I issue, "salt 'hostname' state.highstate -l debug"
..in the comment section :

fractal-dC5e.fractal.lan:
----------
ID: fractalpkgs
Function: pkgrepo.managed
Result: True
Comment: Package repo 'fractalpkgs' already configured
Changes:
----------
* ID: glusterfs*
* Function: pkg.installed*
* Result: False*
* Comment: The following package(s) were not found, and no possible
matches were found in the package db: glusterfs*
* Changes: *
----------
ID: smartmontools
Function: pkg.installed
Result: True
Comment: Package smartmontools is already installed
Changes:

Summary
------------
Succeeded: 2
Failed: 1
------------
Total: 3
Post by o***@fractalio.com
Post by o***@fractalio.com
I succeeded for "smartmontools" package but its not working for
"glusterfs"
Post by o***@fractalio.com
packages.
Please post the errors you got.
--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Diep Pham
2014-10-27 16:45:52 UTC
Permalink
Post by o***@fractalio.com
- humanname: Fractal Packages
- baseurl: http://xxx.xxx.x.xxx/fractallocal
- fromrepo: Fractal Packages
- skip_verify: True
- refresh: True
You should add dependencies like:
- require:
- pkgrepo: fractalpkgs
Post by o***@fractalio.com
- fromrepo: Fractal Packages
- skip_verify: True
- refresh: True
Same as above.

Can you verify that the repo is already proper configured?
Please post `yum repolist` result and content of /etc/yum.repos.d/xxx ?
--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Omkar Sharma
2014-10-28 05:35:42 UTC
Permalink
# yum repolist
Loaded plugins: downloadonly, fastestmirror, security
Loading mirror speeds from cached hostfile
Could not get metalink
https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=x86_64 error was
14: problem making ssl connection
* base: centos.excellmedia.net
* epel: kartolo.sby.datautama.net.id
* extras: centos.excellmedia.net
* updates: centos.excellmedia.net
FRACTALLOCAL | 2.9 kB
00:00
FRACTALLOCAL/primary_db | 30 kB
00:00
base | 3.7 kB
00:00
extras | 3.3 kB
00:00
updates | 3.4 kB
00:00
repo id repo name
status
FRACTALLOCAL Fractal
Packages 19
base CentOS-6 - Base
6,367
epel Extra Packages for Enterprise Linux 6 - x86_64
11,105
extras CentOS-6 -
Extras 15
updates CentOS-6 - Updates
1,608
repolist: 19,114


# cat /etc/yum.repos.d/fractallocal.repo
[FRACTALLOCAL]
name=Fractal Packages
baseurl=http://xxx.xxx.x.xxx/fractallocal
enable=1
gpgcheck=0

With Regards,
Omkar MN
Post by Diep Pham
Post by o***@fractalio.com
- humanname: Fractal Packages
- baseurl: http://xxx.xxx.x.xxx/fractallocal
- fromrepo: Fractal Packages
- skip_verify: True
- refresh: True
- pkgrepo: fractalpkgs
Post by o***@fractalio.com
- fromrepo: Fractal Packages
- skip_verify: True
- refresh: True
Same as above.
Can you verify that the repo is already proper configured?
Please post `yum repolist` result and content of /etc/yum.repos.d/xxx ?
--
You received this message because you are subscribed to a topic in the
Google Groups "Salt-users" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/salt-users/_eHTCnwDSlU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
o***@fractalio.com
2014-10-28 12:49:02 UTC
Permalink
Am success fully able to install rpm packages through yum as I did some
changes that fractalpkgs.sls file :

fractalpkgs:
pkgrepo.managed:
- humanname: Fractal Packages
- baseurl: http://xxx.xxx.xxx.xxx/fractallocal
- require_in:
- pkg: smartmontools

smartmontools:
pkg.installed:
- skip_verify: True
- refresh: True

glusterfs:
pkg.installed:
- skip_verify: True
- refresh: True

From the previous mail you can see I omitted "Fromrepo: " field thats why I
succeeded in installing it. Can you please throw some light on this ?
Post by Diep Pham
Post by o***@fractalio.com
- humanname: Fractal Packages
- baseurl: http://xxx.xxx.x.xxx/fractallocal
- fromrepo: Fractal Packages
- skip_verify: True
- refresh: True
- pkgrepo: fractalpkgs
Post by o***@fractalio.com
- fromrepo: Fractal Packages
- skip_verify: True
- refresh: True
Same as above.
Can you verify that the repo is already proper configured?
Please post `yum repolist` result and content of /etc/yum.repos.d/xxx ?
--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Wolodja Wentland
2014-10-28 16:13:31 UTC
Permalink
Well, the name you used in your fromrepo block was obviously not correct. I
can only ask again: How would you install the package manually? Salt simply
passes the argument to fromrepo to yum, so you have to use a name yum
understands.

This coukd have easily been a bit easier...
Post by o***@fractalio.com
Am success fully able to install rpm packages through yum as I did some
- humanname: Fractal Packages
- baseurl: http://xxx.xxx.xxx.xxx/fractallocal
- pkg: smartmontools
- skip_verify: True
- refresh: True
- skip_verify: True
- refresh: True
From the previous mail you can see I omitted "Fromrepo: " field thats why
I succeeded in installing it. Can you please throw some light on this ?
Post by Diep Pham
Post by o***@fractalio.com
- humanname: Fractal Packages
- baseurl: http://xxx.xxx.x.xxx/fractallocal
- fromrepo: Fractal Packages
- skip_verify: True
- refresh: True
- pkgrepo: fractalpkgs
Post by o***@fractalio.com
- fromrepo: Fractal Packages
- skip_verify: True
- refresh: True
Same as above.
Can you verify that the repo is already proper configured?
Please post `yum repolist` result and content of /etc/yum.repos.d/xxx ?
--
You received this message because you are subscribed to the Google Groups
"Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Omkar Sharma
2014-10-29 05:12:16 UTC
Permalink
Well, thanks.

The documentation says :
http://docs.saltstack.com/en/latest/ref/states/all/salt.states.pkg.html
fromrepo : specifies a repository from which to install.

This is my /etc/yum.repo.d/fractallocal.repo contents :







*# cat /etc/yum.repos.d/fractallocal.repo [FRACTALLOCAL]name=Fractal
Packagesbaseurl=http://xxx.xxx.xxx.xxx/fractallocal
<http://xxx.xxx.xxx.xxx/fractallocal>enable=1gpgcheck=0*

What parameter I should give for fromrepo ? Is it needed in
/srv/salt/fractalpkgs.sls? Why it is working now ?
When to use "fromrepo" ?
















*Here are the contents of /srv/salt/fractalpkgs.sls? Can you please analyze
this issue? fractalpkgs: pkgrepo.managed: - humanname: Fractal
Packages - baseurl: http://xxx.xxx.xxx.xxx/fractallocal
<http://xxx.xxx.xxx.xxx/fractallocal> - require_in: - pkg:
smartmontoolssmartmontools: pkg.installed: - skip_verify: True -
refresh: Trueglusterfs: pkg.installed:*

* - skip_verify: True - refresh: True*

Thanks in Advance,
Omkar MN
Post by Wolodja Wentland
Well, the name you used in your fromrepo block was obviously not correct.
I can only ask again: How would you install the package manually? Salt
simply passes the argument to fromrepo to yum, so you have to use a name
yum understands.
This coukd have easily been a bit easier...
Post by o***@fractalio.com
Am success fully able to install rpm packages through yum as I did
- humanname: Fractal Packages
- baseurl: http://xxx.xxx.xxx.xxx/fractallocal
- pkg: smartmontools
- skip_verify: True
- refresh: True
- skip_verify: True
- refresh: True
From the previous mail you can see I omitted "Fromrepo: " field thats why
I succeeded in installing it. Can you please throw some light on this ?
Post by Diep Pham
Post by o***@fractalio.com
- humanname: Fractal Packages
- baseurl: http://xxx.xxx.x.xxx/fractallocal
- fromrepo: Fractal Packages
- skip_verify: True
- refresh: True
- pkgrepo: fractalpkgs
Post by o***@fractalio.com
- fromrepo: Fractal Packages
- skip_verify: True
- refresh: True
Same as above.
Can you verify that the repo is already proper configured?
Please post `yum repolist` result and content of /etc/yum.repos.d/xxx ?
--
You received this message because you are subscribed to the Google Groups
"Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the
Google Groups "Salt-users" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/salt-users/_eHTCnwDSlU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Wolodja Wentland
2014-10-30 06:54:04 UTC
Permalink
The documentation says : http://docs.saltstack.com/en/latest/ref/states/all/
salt.states.pkg.html
fromrepo : specifies a repository from which to install.
# cat /etc/yum.repos.d/fractallocal.repo
[FRACTALLOCAL]
name=Fractal Packages
baseurl=http://xxx.xxx.xxx.xxx/fractallocal
enable=1
gpgcheck=0
What parameter I should give for fromrepo ? Is it needed in /srv/salt/
fractalpkgs.sls? Why it is working now ?
When to use "fromrepo" ?
You give "fromrepo" exactly the same argument as the option you would pass to
your package manager. This has nothing to do with the way you configure your
repository in salt, but how your repository presents itself to the packaging
system. I have been trying to get you to reveal the *manual* command that you
would use on your minion to install that package without success for some time,
so I'm not going to start guessing now.

But let me give you a different example:

repo-wheezy-backports:
pkgrepo.managed:
- humanname: Wheezy Backports Repository
- name: deb http://http.debian.net/debian/ wheezy-backports main
- dist: wheezy-backports
- comps: main,contrib,non-free
- consolidate: True
- require:
- pkg: python-apt

would setup a standard wheezy-backports repository on Debian. If you wanted to
install packages from there you'd do that by calling "apt-get -t wheezy-backport
install $PKG". That is you would pass "wheezy-backports" rather than "Wheezy
Backports Repository" to the package manager as the package manager has no idea
about your salt states (nor should it). The value of the "fromrepo" key would,
conversely, also be "wheezy-backports".

Now, for the last time: *How would you install packages from your repository
manually?* ?
--
Wolodja <***@gmail.com>

4096R/CAF14EFC
081C B7CD FF04 2BA9 94EA 36B2 8B7F 7D30 CAF1 4EFC
Omkar Sharma
2014-10-30 06:59:14 UTC
Permalink
Thanks.
How would you install packages from your repository
manually?

yum --nogpgcheck localinstall <rpm_name> ...am using
Centos, works on it.
Post by Omkar Sharma
http://docs.saltstack.com/en/latest/ref/states/all/
Post by Omkar Sharma
salt.states.pkg.html
fromrepo : specifies a repository from which to install.
# cat /etc/yum.repos.d/fractallocal.repo
[FRACTALLOCAL]
name=Fractal Packages
baseurl=http://xxx.xxx.xxx.xxx/fractallocal
enable=1
gpgcheck=0
What parameter I should give for fromrepo ? Is it needed in /srv/salt/
fractalpkgs.sls? Why it is working now ?
When to use "fromrepo" ?
You give "fromrepo" exactly the same argument as the option you would pass to
your package manager. This has nothing to do with the way you configure your
repository in salt, but how your repository presents itself to the packaging
system. I have been trying to get you to reveal the *manual* command that you
would use on your minion to install that package without success for some time,
so I'm not going to start guessing now.
- humanname: Wheezy Backports Repository
- name: deb http://http.debian.net/debian/ wheezy-backports main
- dist: wheezy-backports
- comps: main,contrib,non-free
- consolidate: True
- pkg: python-apt
would setup a standard wheezy-backports repository on Debian. If you wanted to
install packages from there you'd do that by calling "apt-get -t wheezy-backport
install $PKG". That is you would pass "wheezy-backports" rather than "Wheezy
Backports Repository" to the package manager as the package manager has no idea
about your salt states (nor should it). The value of the "fromrepo" key would,
conversely, also be "wheezy-backports".
Now, for the last time: *How would you install packages from your repository
manually?* ?
--
4096R/CAF14EFC
081C B7CD FF04 2BA9 94EA 36B2 8B7F 7D30 CAF1 4EFC
--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Wolodja Wentland
2014-10-27 20:07:45 UTC
Permalink
Post by o***@fractalio.com
Am trying to install rpm packages on minions using salt.
I succeeded for "smartmontools" package but its not working for "glusterfs"
[...]
Post by o***@fractalio.com
- fromrepo: Fractal Packages
- skip_verify: True
- refresh: True
As discussed on IRC: Please try installing the software manually on the command
line and verify that the package name is correct and that the repository (which
you created yourself IIRC) has been configured properly.
--
Wolodja <***@gmail.com>

4096R/CAF14EFC
081C B7CD FF04 2BA9 94EA 36B2 8B7F 7D30 CAF1 4EFC
Loading...