| Summary: | puppet-агент каждый прогон пытается обновить пакет | ||
|---|---|---|---|
| Product: | Sisyphus | Reporter: | Вадим М. <matveevskiy.vadim> |
| Component: | puppet | Assignee: | majioa <majioa> |
| Status: | CLOSED FIXED | QA Contact: | qa-sisyphus |
| Severity: | normal | ||
| Priority: | P5 | CC: | admsasha, cas, imz, led, majioa, mike, nbr, pav, rider, stalker, zurabishvilinn |
| Version: | unstable | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
puppet-8.4.0-alt1.1
Стенды (обновлены до сизифа):
KWorkstation 10.3 x86-64
Workstation 10.2 x86-64
Education 10.2 KDE x86-64
Education 10.2 x86-64
Server 10.2 office x86-64
Шаги:
1. # puppet apply --verbose --debug --execute "package {'neofetch': ensure => latest }"
Фактический результат: puppet сравнивает версию без %{DISTTAG} и поэтому считает что новая версия доступна для установки
Debug: Prefetching aptrpm resources for package
Debug: Executing: '/usr/bin/rpm --version'
Debug: Executing '/usr/bin/rpm -qa --nosignature --nodigest --qf '%{NAME} %|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} %{ARCH}\n' | sort'
Debug: Executing: '/usr/bin/apt-cache showpkg neofetch'
Debug: /Stage[main]/Main/Package[neofetch]/ensure: neofetch "7.1.0-alt5" is installed, latest is "7.1.0-alt5:sisyphus+342895.100.1.1@1710578036"
Debug: Executing: '/usr/bin/apt-get -q -y install neofetch'
Notice: /Stage[main]/Main/Package[neofetch]/ensure: ensure changed '7.1.0-alt5' to '7.1.0-alt5:sisyphus+342895.100.1.1@1710578036'
Ожидаемый результат: puppet сравнит версию с использованием %{DISTTAG} и не будет пытаться установить новую версию которой еще нет
|
У нас есть простенький ресурс в puppet, для установки/обновления пакета ca-certificates: package{'ca-certificates': ensure => latest } Но при каждом запуске puppet-агента он выводит уведомление, что пытается обновить этот пакет, хотя указанная версия уже установлена: Debug: Executing '/bin/rpm -qa --nosignature --nodigest --qf '%{NAME} %|EPOCH?{%{EPOCH}}:{0}| %{VERSION} %{RELEASE} %{ARCH}\n' | sort' Debug: Executing: '/usr/bin/apt-cache showpkg ca-certificates' Debug: /Stage[main]/Post_base__v1_2::Root_certs::Update_ca/Package[ca-certificates]/ensure: ca-certificates "2022.09.15-alt1" is installed, latest is "2022.09.15-alt1:p10+308004.100.2.1@1665748370" Debug: Executing: '/usr/bin/apt-get -q -y install ca-certificates' Debug: /Stage[main]/Post_base__v1_2::Root_certs::Update_ca/Package[ca-certificates]/ensure: ca-certificates "2022.09.15-alt1" is installed, latest is "2022.09.15-alt1:p10+308004.100.2.1@1665748370" Notice: /Stage[main]/Post_base__v1_2::Root_certs::Update_ca/Package[ca-certificates]/ensure: ensure changed '2022.09.15-alt1' to '2022.09.15-alt1:p10+308004.100.2.1@1665748370' (corrective) [root@d01toolsalt01t ~]# rpm -qa --nosignature --nodigest --qf '%{NAME} %|EPOCH?{%{EPOCH}}:{0}| %{VERSION}:%{DISTTAG} %{RELEASE} %{ARCH}\n' | grep ca-certificates ca-certificates 0 2022.09.15:p10+308004.100.2.1 alt1 noarch [root@d01toolsalt01t ~]# rpm -q puppet puppet-7.20.0-alt1.noarch [root@d01toolsalt01t ~]# lsb_release -a LSB Version: n/a Distributor ID: ALT Description: ALT Server 10.1 (Mendelevium) Release: 10.1 Codename: Mendelevium Судя по всему проблема в том, что установленная версия пакета проверяется командой rpm, которая не учитывает %{DISTTAG}.