rpm does not update to latest on SLES machine

113 views
Skip to first unread message

Marc Patermann

unread,
Feb 16, 2015, 8:07:26 AM2/16/15
to ansible...@googlegroups.com
Hi,

this is about ansible 1.6.1 on and with SLES machines.

I build newer versions of openldap in the SuSE Build Service.
2.4.39 is installed on the SLES 11 SP 3 machine.

# rpm -qa | grep openldap
openldap2-2.4.39-0
openldap2-client-2.4.39-0

I build 2.4.40 and copied the files to my http repo.

Unfortunatly my ansible script does not update.
Code:

tasks:
- name: install LDAP RPMs
zypper: name={{ item }} state=latest disable_gpg_check=yes
with_items:
- libdb-4_8
- openldap2-client
- libldap-2_4-2
- libldap-2_4-2-32bit
- openldap2

I checked with zypper on the machine:

# zypper up openldap2
Loading repository data...
Reading installed packages...
Resolving package dependencies...

The following packages are going to be upgraded:
libldap-2_4-2 openldap2 openldap2-client

The following packages are not supported by their vendor:
libldap-2_4-2 openldap2 openldap2-client

3 packages to upgrade.
Overall download size: 1.5 MiB. After the operation, 1.6 MiB will be freed.
Continue? [y/n/? shows all options] (y): n


The new rpms are found. But zypper warns with "are not supported by
their vendor".
I think this prevends ansible from automatically update the rpms.

I have a vendors file for obs created before

# cat "/etc/zypp/vendors.d/obs"
vendors = obs://build.opensuse.org

# zypper if openldap2
Loading repository data...
Reading installed packages...

Information for package openldap2:

Repository: Netzdienste Repo
Name: openldap2
Version: 2.4.40-0
Arch: x86_64
Vendor: obs://build.opensuse.org/home:MoserHans
Support Level: unknown
Installed: Yes
Status: out-of-date (version 2.4.39-0 installed)
Installed Size: 3.1 MiB
Summary: The OpenLDAP Server
Description:
The Lightweight Directory Access Protocol (LDAP) is used to access
online directory services. It runs directly over TCP and can be used to
access a stand-alone LDAP directory service or to access a directory
service that has an X.500 back-end.
:~ # rpm -qi openldap2
Name : openldap2 Relocations: (not relocatable)
Version : 2.4.39 Vendor:
obs://build.opensuse.org/home:MoserHans
Release : 0 Build Date: Tue 10 Jun 2014
03:44:28 PM CEST
Install Date: Mon 17 Nov 2014 03:27:19 PM CET Build Host: buildhost-sp3
Group : Productivity/Networking/LDAP/Clients Source RPM:
openldap2-2.4.39-0.src.rpm
Size : 4936865 License: OLDAP-2.8
Signature : (none)
URL : http://www.openldap.org
Summary : The OpenLDAP Server
Description :
The Lightweight Directory Access Protocol (LDAP) is used to access
online directory services. It runs directly over TCP and can be used to
access a stand-alone LDAP directory service or to access a directory
service that has an X.500 back-end.
Distribution: home:MoserHans:branches:network:ldap / SLE_11_SP3

What am I missing, why doesn't ansible update?


[I tried to update to 1.8.2. But this seems to require python 2.7, and
on my ansible machine I only have 2.6.8.]


Marc

Marc Patermann

unread,
Feb 16, 2015, 8:22:20 AM2/16/15
to ansible...@googlegroups.com
Marc Patermann schrieb (16.02.2015 14:07 Uhr):

> What am I missing, why doesn't ansible update?
now it get even weirder.

I ran the playbook again and it tells the openldap2-client rpm
"changed", so it does update:

TASK: [install LDAP RPMs]
*****************************************************
ok: [server] => (item=libdb-4_8)
changed: [server] => (item=openldap2-client)
ok: [server] => (item=libldap-2_4-2)
ok: [server] => (item=libldap-2_4-2-32bit)
ok: [server] => (item=openldap2)

When I checked, this is not the whole truth:

openldap2-client-2.4.40-0 Mon 16 Feb 2015 02:08:35 PM CET
openldap2-2.4.40-0 Mon 16 Feb 2015 02:08:30 PM CET
libldap-2_4-2-2.4.40-0 Mon 16 Feb 2015 02:08:29 PM CET

Not only the client rpm did update, two other did too, but ansible did
not tell!

I checked on another server, where I did not check manually with zypper
and there is everthing like before on server 1, ansible change nothing
and the rpms do not update (from the very same repo).

TASK: [install LDAP RPMs]
*****************************************************
ok: [server2] => (item=libdb-4_8)
ok: [server2] => (item=openldap2-client)
ok: [server2] => (item=libldap-2_4-2)
ok: [server2] => (item=libldap-2_4-2-32bit)
ok: [server2] => (item=openldap2)

# rpm -qa "*ldap*"
yast2-ldap-server-2.17.44-0.5.1
libldap-2_4-2-32bit-2.4.26-0.28.5
libldap-2_4-2-2.4.39-0
libldapcpp1-0.3.0-0.9.29
yast2-ldap-2.17.8-0.7.61
yast2-ldap-client-2.17.38-0.7.2
pam_ldap-32bit-184-147.20
openldap2-2.4.39-0
openldap2-client-2.4.39-0



Marc

Giovanni Tirloni

unread,
Feb 16, 2015, 8:28:09 AM2/16/15
to ansible...@googlegroups.com


On Mon, 16 Feb 2015 14:07 +0100, Marc Patermann
<hans....@ofd-z.niedersachsen.de> wrote:
> Hi,
>
> this is about ansible 1.6.1 on and with SLES machines.
>
> I build newer versions of openldap in the SuSE Build Service.
> 2.4.39 is installed on the SLES 11 SP 3 machine.
>
> # rpm -qa | grep openldap
> openldap2-2.4.39-0
> openldap2-client-2.4.39-0
>
> I build 2.4.40 and copied the files to my http repo.
>
> Unfortunatly my ansible script does not update.
> Code:
>
> tasks:
> - name: install LDAP RPMs
> zypper: name={{ item }} state=latest disable_gpg_check=yes
> with_items:
> - libdb-4_8
> - openldap2-client
> - libldap-2_4-2
> - libldap-2_4-2-32bit
> - openldap2

The zypper module already runs zypper with '--non-interactive' and other
options to avoid prompts (quite puzzling there is no --yes option, from
a yum user's perspective).

Could you run `ansible-playbook -vvv your_playbook.xml` and share the
results for that specific task?

Giovanni

Marc Patermann

unread,
Feb 16, 2015, 8:51:33 AM2/16/15
to ansible...@googlegroups.com
Giovanni,

Giovanni Tirloni schrieb (16.02.2015 14:27 Uhr):

> Could you run `ansible-playbook -vvv your_playbook.xml` and share the
> results for that specific task?
sure:

TASK: [install LDAP RPMs]
*****************************************************
<server2> ESTABLISH CONNECTION FOR USER: adminuser on PORT 22 TO server2
<server2> REMOTE_MODULE zypper name=libdb-4_8 state=latest
disable_gpg_check=yes
<server2> EXEC /bin/sh -c 'mkdir -p
$HOME/.ansible/tmp/ansible-tmp-1424094445.44-232648680851227 && echo
$HOME/.ansible/tmp/ansible-tmp-1424094445.44-232648680851227'
<server2> PUT /tmp/tmpILqhwZ TO
/home/adminuser/.ansible/tmp/ansible-tmp-1424094445.44-232648680851227/zypper
<server2> EXEC /bin/sh -c 'sudo -k && sudo -H -S -p "[sudo via ansible,
key=eqlsbyhrbxstcggffrrlkqdtztmblgac] password: " -u root /bin/sh -c
'"'"'echo SUDO-SUCCESS-eqlsbyhrbxstcggffrrlkqdtztmblgac; LC_CTYPE=C
LANG=C /usr/bin/python -tt
/home/adminuser/.ansible/tmp/ansible-tmp-1424094445.44-232648680851227/zypper;
rm -rf
/home/adminuser/.ansible/tmp/ansible-tmp-1424094445.44-232648680851227/
>/dev/null 2>&1'"'"''
ok: [server2] => (item=libdb-4_8) => {"changed": false, "item":
"libdb-4_8", "name": "libdb-4_8", "state": "latest"}
<server2> ESTABLISH CONNECTION FOR USER: adminuser on PORT 22 TO server2
<server2> REMOTE_MODULE zypper name=openldap2-client state=latest
disable_gpg_check=yes
<server2> EXEC /bin/sh -c 'mkdir -p
$HOME/.ansible/tmp/ansible-tmp-1424094446.3-280944272785663 && echo
$HOME/.ansible/tmp/ansible-tmp-1424094446.3-280944272785663'
<server2> PUT /tmp/tmplEdscA TO
/home/adminuser/.ansible/tmp/ansible-tmp-1424094446.3-280944272785663/zypper
<server2> EXEC /bin/sh -c 'sudo -k && sudo -H -S -p "[sudo via ansible,
key=zhsjsqrslgpkeugpzovmrnaxgshzcukg] password: " -u root /bin/sh -c
'"'"'echo SUDO-SUCCESS-zhsjsqrslgpkeugpzovmrnaxgshzcukg; LC_CTYPE=C
LANG=C /usr/bin/python -tt
/home/adminuser/.ansible/tmp/ansible-tmp-1424094446.3-280944272785663/zypper;
rm -rf
/home/adminuser/.ansible/tmp/ansible-tmp-1424094446.3-280944272785663/
>/dev/null 2>&1'"'"''
ok: [server2] => (item=openldap2-client) => {"changed": false, "item":
"openldap2-client", "name": "openldap2-client", "state": "latest"}
<server2> ESTABLISH CONNECTION FOR USER: adminuser on PORT 22 TO server2
<server2> REMOTE_MODULE zypper name=libldap-2_4-2 state=latest
disable_gpg_check=yes
<server2> EXEC /bin/sh -c 'mkdir -p
$HOME/.ansible/tmp/ansible-tmp-1424094447.2-68739562934949 && echo
$HOME/.ansible/tmp/ansible-tmp-1424094447.2-68739562934949'
<server2> PUT /tmp/tmpyhQGzK TO
/home/adminuser/.ansible/tmp/ansible-tmp-1424094447.2-68739562934949/zypper
<server2> EXEC /bin/sh -c 'sudo -k && sudo -H -S -p "[sudo via ansible,
key=znbotfdntgqhxrbingxzfgwywofxkzlv] password: " -u root /bin/sh -c
'"'"'echo SUDO-SUCCESS-znbotfdntgqhxrbingxzfgwywofxkzlv; LC_CTYPE=C
LANG=C /usr/bin/python -tt
/home/adminuser/.ansible/tmp/ansible-tmp-1424094447.2-68739562934949/zypper;
rm -rf
/home/adminuser/.ansible/tmp/ansible-tmp-1424094447.2-68739562934949/
>/dev/null 2>&1'"'"''
ok: [server2] => (item=libldap-2_4-2) => {"changed": false, "item":
"libldap-2_4-2", "name": "libldap-2_4-2", "state": "latest"}
<server2> ESTABLISH CONNECTION FOR USER: adminuser on PORT 22 TO server2
<server2> REMOTE_MODULE zypper name=libldap-2_4-2-32bit state=latest
disable_gpg_check=yes
<server2> EXEC /bin/sh -c 'mkdir -p
$HOME/.ansible/tmp/ansible-tmp-1424094448.1-225999840967320 && echo
$HOME/.ansible/tmp/ansible-tmp-1424094448.1-225999840967320'
<server2> PUT /tmp/tmp3MYBKC TO
/home/adminuser/.ansible/tmp/ansible-tmp-1424094448.1-225999840967320/zypper
<server2> EXEC /bin/sh -c 'sudo -k && sudo -H -S -p "[sudo via ansible,
key=ybscdquflyyrlkgxdedmclhgxlflvqyj] password: " -u root /bin/sh -c
'"'"'echo SUDO-SUCCESS-ybscdquflyyrlkgxdedmclhgxlflvqyj; LC_CTYPE=C
LANG=C /usr/bin/python -tt
/home/adminuser/.ansible/tmp/ansible-tmp-1424094448.1-225999840967320/zypper;
rm -rf
/home/adminuser/.ansible/tmp/ansible-tmp-1424094448.1-225999840967320/
>/dev/null 2>&1'"'"''
ok: [server2] => (item=libldap-2_4-2-32bit) => {"changed": false,
"item": "libldap-2_4-2-32bit", "name": "libldap-2_4-2-32bit", "state":
"latest"}
<server2> ESTABLISH CONNECTION FOR USER: adminuser on PORT 22 TO server2
<server2> REMOTE_MODULE zypper name=openldap2 state=latest
disable_gpg_check=yes
<server2> EXEC /bin/sh -c 'mkdir -p
$HOME/.ansible/tmp/ansible-tmp-1424094448.97-144455085121971 && echo
$HOME/.ansible/tmp/ansible-tmp-1424094448.97-144455085121971'
<server2> PUT /tmp/tmpR4pe1l TO
/home/adminuser/.ansible/tmp/ansible-tmp-1424094448.97-144455085121971/zypper
<server2> EXEC /bin/sh -c 'sudo -k && sudo -H -S -p "[sudo via ansible,
key=ajgfurgczeqtcywfwhecvxrhzvzvsktm] password: " -u root /bin/sh -c
'"'"'echo SUDO-SUCCESS-ajgfurgczeqtcywfwhecvxrhzvzvsktm; LC_CTYPE=C
LANG=C /usr/bin/python -tt
/home/adminuser/.ansible/tmp/ansible-tmp-1424094448.97-144455085121971/zypper;
rm -rf
/home/adminuser/.ansible/tmp/ansible-tmp-1424094448.97-144455085121971/
>/dev/null 2>&1'"'"''
ok: [server2] => (item=openldap2) => {"changed": false, "item":
"openldap2", "name": "openldap2", "state": "latest"}


Marc

Giovanni Tirloni

unread,
Feb 16, 2015, 10:08:15 AM2/16/15
to ansible...@googlegroups.com


On Mon, 16 Feb 2015 14:51 +0100, Marc Patermann
<hans....@ofd-z.niedersachsen.de> wrote:
> Giovanni,
>
> Giovanni Tirloni schrieb (16.02.2015 14:27 Uhr):
>
> > Could you run `ansible-playbook -vvv your_playbook.xml` and share the
> > results for that specific task?
> sure:

Sorry if I'm being a bit too dense but I'm confused about the current
state of the servers when you run ansible. Can you downgrade the
packages and attempt it again?

In your output, ansible seems to think all 4 packages are already at
their latest versions on server2. Can you confirm with rpm -qa that it's
indeed true for that server?

<server2> REMOTE_MODULE zypper name=openldap2-client state=latest
disable_gpg_check=yes
ok: [server2] => (item=openldap2-client) => {"changed": false, "item":
"openldap2-client", "name": "openldap2-client", "state": "latest"}

<server2> REMOTE_MODULE zypper name=libldap-2_4-2 state=latest
disable_gpg_check=yes
ok: [server2] => (item=libldap-2_4-2) => {"changed": false, "item":
"libldap-2_4-2", "name": "libldap-2_4-2", "state": "latest"}

<server2> REMOTE_MODULE zypper name=libldap-2_4-2-32bit state=latest
disable_gpg_check=yes
ok: [server2] => (item=libldap-2_4-2-32bit) => {"changed": false,
"item": "libldap-2_4-2-32bit", "name": "libldap-2_4-2-32bit", "state":
"latest"}

<server2> REMOTE_MODULE zypper name=openldap2 state=latest
disable_gpg_check=yes
ok: [server2] => (item=openldap2) => {"changed": false, "item":
"openldap2", "name": "openldap2", "state": "latest"}

Giovanni

Marc Patermann

unread,
Feb 16, 2015, 11:04:30 AM2/16/15
to ansible...@googlegroups.com
Giovanni,

Giovanni Tirloni schrieb (16.02.2015 16:08 Uhr):
> On Mon, 16 Feb 2015 14:51 +0100, Marc Patermann
> <hans....@ofd-z.niedersachsen.de> wrote:
>> Giovanni Tirloni schrieb (16.02.2015 14:27 Uhr):
>>
>>> Could you run `ansible-playbook -vvv your_playbook.xml` and share the
>>> results for that specific task?
>> sure:
>
> Sorry if I'm being a bit too dense but I'm confused about the current
> state of the servers when you run ansible. Can you downgrade the
> packages and attempt it again?
At the moment I have two servers.
The first one ("server") is now on the latest packages (2.4.40), but
ansible only told it updated the client package, but updated indeed
three packages.

The second one ("server2") ist still on the older packages from the
initial ansible installation (2.4.39).
Have a look at the second half of may mal from 14:22 today.

> In your output, ansible seems to think all 4 packages are already at
> their latest versions on server2. Can you confirm with rpm -qa that it's
> indeed true for that server?
No, they are still on 2.4.39 and that is not "latest".

# zypper --no-gpg-checks if openldap2
Loading repository data...
Reading installed packages...


Information for package openldap2:

Repository: myown Repo
Name: openldap2
Version: 2.4.40-0
Arch: x86_64
Vendor: obs://build.opensuse.org/home:MoserHans
Support Level: unknown
Installed: Yes
Status: out-of-date (version 2.4.39-0 installed)
Installed Size: 3.1 MiB
Summary: The OpenLDAP Server
Description:
The Lightweight Directory Access Protocol (LDAP) is used to access
online directory services. It runs directly over TCP and can be used to
access a stand-alone LDAP directory service or to access a directory
service that has an X.500 back-end.


Marc

Toshio Kuratomi

unread,
Feb 16, 2015, 11:36:23 AM2/16/15
to ansible...@googlegroups.com
I'm not a zypper user but I noticed this in your information:

# cat "/etc/zypp/vendors.d/obs"
vendors = obs://build.opensuse.org

# zypper if openldap2
[..]
Vendor: obs://build.opensuse.org/home:MoserHans

Perhaps the vendors = line needs to specify
obs://build.opensuse.org/home:MoserHans ?

-Toshio
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to ansible-proje...@googlegroups.com.
> To post to this group, send email to ansible...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/54E213DF.5060106%40ofd-z.niedersachsen.de.
>
> For more options, visit https://groups.google.com/d/optout.

alxgu

unread,
Feb 17, 2015, 4:37:30 AM2/17/15
to ansible...@googlegroups.com, hans....@ofd-z.niedersachsen.de
Hi Marc,

it is a Bug. Please have a look on this PR https://github.com/ansible/ansible/pull/8598

I recommend you to use the latest ansible version.

Regards,
Alex

Marc Patermann

unread,
Feb 17, 2015, 8:04:03 AM2/17/15
to alxgu, ansible...@googlegroups.com
Alex,

alxgu schrieb (17.02.2015 10:37 Uhr):

> it is a Bug. Please have a look on this PR
> https://github.com/ansible/ansible/pull/8598
>
> I recommend you to use the latest ansible version.
for first try I patched the zipper module manually.
Thank you!

Marc

Marc Patermann

unread,
Feb 17, 2015, 8:10:01 AM2/17/15
to ansible...@googlegroups.com
Marc Patermann schrieb (16.02.2015 14:22 Uhr):
> Marc Patermann schrieb (16.02.2015 14:07 Uhr):
> I ran the playbook again and it tells the openldap2-client rpm
> "changed", so it does update:
>
> TASK: [install LDAP RPMs]
> *****************************************************
> ok: [server] => (item=libdb-4_8)
> changed: [server] => (item=openldap2-client)
> ok: [server] => (item=libldap-2_4-2)
> ok: [server] => (item=libldap-2_4-2-32bit)
> ok: [server] => (item=openldap2)
>
> When I checked, this is not the whole truth:
>
> openldap2-client-2.4.40-0 Mon 16 Feb 2015 02:08:35 PM CET
> openldap2-2.4.40-0 Mon 16 Feb 2015 02:08:30 PM CET
> libldap-2_4-2-2.4.40-0 Mon 16 Feb 2015 02:08:29 PM CET
>
> Not only the client rpm did update, two other did too, but ansible did
> not tell!
well, openldap2-client depends on libldap-2_4-2 and on this depends
openldap2. So all three package update together.
But ansible does not tell.

I suspect, that when ansible comes to the next item - libldap-2_4-2 -
this is already updated from the previous item, so it is "OK".

Is this the way it is intended to be?


Marc

alxgu

unread,
Feb 19, 2015, 8:50:52 AM2/19/15
to ansible...@googlegroups.com, hans....@ofd-z.niedersachsen.de
Hi Marc,

in the latest ansible version are all packages installed in one module run.
So you would only see one "changed" message/line and all of your packages are on the latest state.

changed: [$server] => (item=openldap2-client,libldap-2_4-2,xxx, etc.)

Regards,
Alex
Reply all
Reply to author
Forward
0 new messages