Project

General

Profile

Actions

Bug #25885

closed

checksum-type does not updated on already synced repository at Katello Capsule.

Added by Samir Jha over 5 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Urgent
Assignee:
Category:
Content Views
Target version:
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1664288

++ This bug was initially created as a clone of Bug #1288656 ++

Description of problem:

If the checksum-type for a custom repository is changed on the Satellite webUI, the repodata on the Satellite server works as expected, however the content synced to the Capsule does not get updated. The only way to get it updated, is to create a new content view and sync to the capsule. Note that creating a new version and promoting does not work. Must be a complete new content view.

Version-Release number of selected component (if applicable):
6.1.4

How reproducible:
100%

Steps to Reproduce:
1. Create a product and repository with sha256
2. Add this a lifecycle environment related to a capsule and sync it
3. Use pulp-admin or check the repodata created on the capsule and it will be using sha1256
4. Modify the repository to use sha1 and create a new version for the content view
5. Sync and check the repodata. On the Satellite server, repodata now will have sha1 however the capsule still has sha256

Actual results:

Capsule still has sha256

Expected results:

Capsule must reflect the configuration on the Satellite server

Additional info:

--- Additional comment from Marcelo Moreira de Mello on 2015-12-04 22:01:56 UTC ---

hammer> repository info --id 18 --organization-id 1
ID: 18
Name: my_packages_repo
Label: my_packages_repo
Organization: mellow
Red Hat Repository: no
Content Type: yum
Checksum Type: sha256
URL:
Publish Via HTTP: yes
Published At: http://satellite6-mmello.usersys.redhat.com/pulp/repos/mellow/Library/custom/my_packages/my_packages_repo
Product:
ID: 133
Name: my_packages
GPG Key:

Sync:
Status:
Created: 2015/12/03 21:36:30
Updated: 2015/12/03 21:36:32
Content Counts:
Packages: 1
Errata: 0

========
hammer> repository info --id 18 --organization-id 1
ID: 18
Name: my_packages_repo
Label: my_packages_repo
Organization: mellow
Red Hat Repository: no
Content Type: yum
Checksum Type: sha1
URL:
Publish Via HTTP: yes
Published At: http://satellite6-mmello.usersys.redhat.com/pulp/repos/mellow/Library/custom/my_packages/my_packages_repo
Product:
ID: 133
Name: my_packages
GPG Key:

Sync:
Status:
Created: 2015/12/03 21:36:30
Updated: 2015/12/04 17:26:48
Content Counts:
Packages: 1
Errata: 0

new repodata on satellite side
[root@satellite6-mmello repodata]# pwd
/var/lib/pulp/published/yum/master/mellow-Capsule_Contents-test_content_view_hash_repo-my_packages-my_packages_repo/1449250820.37/repodata

[root@satellite6-mmello repodata]# date -d @1449250820.37
Fri Dec 4 12:40:20 EST 2015

[root@satellite6-mmello repodata]# ll
total 36
rw-r--r-. 1 apache apache 93 Dec 3 16:36 078788856d40302139d2a04f31944c1311c36d08c8c88fdd597f3931c3bbcf1b-updateinfo.xml.gz
rw-r--r-. 1 apache apache 857 Dec 4 12:26 3a13b90a846cdef827fa91fdab1ab7c97bd113c8-primary.xml.gz
rw-r--r-. 1 apache apache 130 Dec 3 16:36 3e800f8eb4bfc89f8e320cda3dd709a8e0bef5f4884e3b622df63b17249e8242-comps.xml
rw-r--r-. 1 apache apache 93 Dec 4 12:26 3fd398096af8fe47b503cc41fc1a73744d4847c5-updateinfo.xml.gz
rw-r--r-. 1 apache apache 130 Dec 4 12:26 406ca46e811cbb67669659067e496c49a203ebc8-comps.xml
rw-r--r-. 1 apache apache 338 Dec 4 12:26 6ff484adcd2a2df4faa8ece2e203d19f387b9184-filelists.xml.gz
rw-r--r-. 1 apache apache 93 Dec 3 16:36 73a56f2b5bf51c188906979415edd5778669017b1296092f939099b35c5df0e9-updateinfo.xml.gz
rw-r--r-. 1 apache apache 776 Dec 4 12:26 788a455fd9b0eb4ec7232f97b61f3bf98d726ca6-other.xml.gz
rw-r--r-. 1 apache apache 1785 Dec 4 12:40 repomd.xml

[root@satellite6-mmello repodata]# cat repomd.xml

<repomd xmlns="http://linux.duke.edu/metadata/repo&quot; xmlns:rpm="http://linux.duke.edu/metadata/rpm&quot;&gt;&lt;revision&gt;1449250820&lt;/revision>
<data type="filelists"><location href="repodata/6ff484adcd2a2df4faa8ece2e203d19f387b9184-filelists.xml.gz"/><timestamp>1449250820</timestamp><size>338</size><checksum type="sha1">6ff484adcd2a2df4faa8ece2e203d19f387b9184</checksum><open-size>989</open-size><open-checksum type="sha1">1b967c55cdc664074a3a17b209ceabd27e515db4</open-checksum></data>
<data type="other"><location href="repodata/788a455fd9b0eb4ec7232f97b61f3bf98d726ca6-other.xml.gz"/><timestamp>1449250820</timestamp><size>776</size><checksum type="sha1">788a455fd9b0eb4ec7232f97b61f3bf98d726ca6</checksum><open-size>3595</open-size><open-checksum type="sha1">328700d99313dd2e5a58b8e25af0d8e4439c4a97</open-checksum></data>
<data type="primary"><location href="repodata/3a13b90a846cdef827fa91fdab1ab7c97bd113c8-primary.xml.gz"/><timestamp>1449250820</timestamp><size>857</size><checksum type="sha1">3a13b90a846cdef827fa91fdab1ab7c97bd113c8</checksum><open-size>3365</open-size><open-checksum type="sha1">76d062b7ec3ce3310763bc685acef0d034b3d585</open-checksum></data>
<data type="updateinfo"><location href="repodata/3fd398096af8fe47b503cc41fc1a73744d4847c5-updateinfo.xml.gz"/><timestamp>1449250820</timestamp><size>93</size><checksum type="sha1">3fd398096af8fe47b503cc41fc1a73744d4847c5</checksum><open-size>60</open-size><open-checksum type="sha1">3fcacfde981974f9a50c64ea59d042da898c45f1</open-checksum></data>
<data type="group"><location href="repodata/406ca46e811cbb67669659067e496c49a203ebc8-comps.xml"/><timestamp>1449250820</timestamp><size>130</size><checksum type="sha1">406ca46e811cbb67669659067e496c49a203ebc8</checksum></data>
</repomd>

[root@satellite6-mmello-capsule repodata]# pwd
/var/lib/pulp/published/yum/master/yum_distributor/mellow-Capsule_Contents-test_content_view_hash_repo-my_packages-my_packages_repo/1449252316.98/repodata

[root@satellite6-mmello-capsule 1449252316.98]# date -d @1449252316.98
Fri Dec 4 13:05:16 EST 2015

[root@satellite6-mmello-capsule repodata]# ll
total 28
rw-r--r-. 1 apache apache 93 Dec 4 13:05 12f3becd41d775e64daa45434a22619f24cd8e13f547970f8737afa3cad9404b-updateinfo.xml.gz
rw-r--r-. 1 apache apache 130 Dec 4 13:05 3e800f8eb4bfc89f8e320cda3dd709a8e0bef5f4884e3b622df63b17249e8242-comps.xml
rw-r--r-. 1 apache apache 93 Dec 3 17:48 5e70fcf6b01ff6104fdac6d864bcdebd4ad17224f31054343987abf32a037ea6-updateinfo.xml.gz
rw-r--r-. 1 apache apache 834 Dec 4 13:05 8b5874088a6dc2919174051735cb8a7d13895de8ce0122dc7e54bc1e37375749-primary.xml.gz
rw-r--r-. 1 apache apache 752 Dec 4 13:05 8c56dcfa580cc8bbe20e1e19cdb540c4ed1784220633dc03277daac273d42b89-other.xml.gz
rw-r--r-. 1 apache apache 329 Dec 4 13:05 9a7eb854e0c4f5658d631f9798ff68468b254e8aa2570829813a058bf9293147-filelists.xml.gz
rw-r--r-. 1 apache apache 2144 Dec 4 13:05 repomd.xml

--> however still sha256  on the capsule

[root@satellite6-mmello-capsule repodata]# cat repomd.xml

<repomd xmlns="http://linux.duke.edu/metadata/repo&quot; xmlns:rpm="http://linux.duke.edu/metadata/rpm&quot;&gt;&lt;revision&gt;1449252316&lt;/revision>
<data type="filelists"><location href="repodata/9a7eb854e0c4f5658d631f9798ff68468b254e8aa2570829813a058bf9293147-filelists.xml.gz" /><timestamp>1449252316</timestamp><size>329</size><checksum type="sha256">9a7eb854e0c4f5658d631f9798ff68468b254e8aa2570829813a058bf9293147</checksum><open-size>556</open-size><open-checksum type="sha256">176340f2c26ade5de5a216a2c350027518356933756451ae312e5ab32eae4ee1</open-checksum></data>
<data type="other"><location href="repodata/8c56dcfa580cc8bbe20e1e19cdb540c4ed1784220633dc03277daac273d42b89-other.xml.gz" /><timestamp>1449252316</timestamp><size>752</size><checksum type="sha256">8c56dcfa580cc8bbe20e1e19cdb540c4ed1784220633dc03277daac273d42b89</checksum><open-size>1857</open-size><open-checksum type="sha256">9abab893ffe99de621b051279e49a52d929e57f9305a91e485ff77e98737c5c6</open-checksum></data>
<data type="primary"><location href="repodata/8b5874088a6dc2919174051735cb8a7d13895de8ce0122dc7e54bc1e37375749-primary.xml.gz" /><timestamp>1449252316</timestamp><size>834</size><checksum type="sha256">8b5874088a6dc2919174051735cb8a7d13895de8ce0122dc7e54bc1e37375749</checksum><open-size>1765</open-size><open-checksum type="sha256">353fa332444289151792820f9d2dfaa13700fc6ef9030fa724b3e204942a1978</open-checksum></data>
<data type="updateinfo"><location href="repodata/12f3becd41d775e64daa45434a22619f24cd8e13f547970f8737afa3cad9404b-updateinfo.xml.gz" /><timestamp>1449252316</timestamp><size>93</size><checksum type="sha256">12f3becd41d775e64daa45434a22619f24cd8e13f547970f8737afa3cad9404b</checksum><open-size>60</open-size><open-checksum type="sha256">c12d66b45503fbedd6f6211054309902124b1e254cdc7634961025d5d7aaa1ed</open-checksum></data>
<data type="group"><location href="repodata/3e800f8eb4bfc89f8e320cda3dd709a8e0bef5f4884e3b622df63b17249e8242-comps.xml" /><timestamp>1449252316</timestamp><size>130</size><checksum type="sha256">3e800f8eb4bfc89f8e320cda3dd709a8e0bef5f4884e3b622df63b17249e8242</checksum></data>
</repomd>

--- Additional comment from Marcelo Moreira de Mello on 2015-12-04 22:02:36 UTC ---

--- troubleshoot notes ----

http://projects.theforeman.org/issues/12368
[root@satellite6-mmello-capsule ~]# pulp-admin login -u admin
Enter password:
An internal error occurred on the Pulp server:

RequestException: POST request
on /pulp/api/v2/actions/login/ failed with 500 - error signing cert request:
Signature ok
subject=/CN=admin:admin:5660bdf19c81a033c9d526e7
Getting CA Private
Key
CA certificate and CA private key do not
match
140587327670176:error:0B080074:x509 certificate
routines:X509_check_private_key:key values mismatch:x509_cmp.c:331:
unable to
write 'random state'

---
[root@satellite6-mmello repodata]# pulp-admin login -u admin
Enter password:
Successfully logged in. Session certificate will expire at Dec 11 18:53:59 2015
GMT.

[root@satellite6-mmello repodata]# cd
[root@satellite6-mmello ~]# scp -r ~/.pulp :
admin.log 100% 0 0.0KB/s 00:00
server_calls.log 100% 2156 2.1KB/s 00:00
user-cert.pem

--- then worked on capsule

[root@satellite6-mmello-capsule ~]# pulp-admin rpm repo list --details
--------------------------------------------------------------------
RPM Repositories
--------------------------------------------------------------------

Id: mellow-Capsule_Contents-test_content_view_hash_repo-my_pack
ages-my_packages_repo
Display Name: my_packages_repo
Description: None
Content Unit Counts:
Rpm: 1
Notes:
Importers:
Config:
Manifest URL: https://satellite6-mmello.usersys.redhat.com/pulp/nodes/https/
repos/mellow-Capsule_Contents-test_content_view_hash_repo-my_p
ackages-my_packages_repo/manifest.json
Strategy: mirror
Id: nodes_http_importer
Importer Type Id: nodes_http_importer
Last Sync: 2015-12-04T18:05:16Z
Repo Id: mellow-Capsule_Contents-test_content_view_hash_repo-my_packa
ges-my_packages_repo
Scheduled Syncs:
Distributors:
Auto Publish: False
Config:
Destination Distributor Id: mellow-Capsule_Contents-test_content_view_hash_r
epo-my_packages-my_packages_repo
Distributor Type Id: yum_clone_distributor
Id: mellow-Capsule_Contents-test_content_view_hash_repo-my_pa
ckages-my_packages_repo_clone
Last Publish: None
Repo Id: mellow-Capsule_Contents-test_content_view_hash_repo-my_pa
ckages-my_packages_repo
Scheduled Publishes:
Auto Publish: True
Config:
Checksum Type: sha256 <--- did not get updated
Http: True
Https: True
Protected: True
Relative URL: mellow/Capsule_Contents/test_content_view_hash_repo/custom/my
_packages/my_packages_repo
Distributor Type Id: yum_distributor
Id: mellow-Capsule_Contents-test_content_view_hash_repo-my_pa
ckages-my_packages_repo
Last Publish: 2015-12-04T18:05:17Z
Repo Id: mellow-Capsule_Contents-test_content_view_hash_repo-my_pa
ckages-my_packages_repo
Scheduled Publishes:

however on Satellite, repo has the correct checksum

Id: mellow-my_packages-my_packages_repo
Display Name: my_packages_repo
Description: None
Content Unit Counts:
Rpm: 1
Notes:
Importers:
Config:
Id: yum_importer
Importer Type Id: yum_importer
Last Sync: None
Repo Id: mellow-my_packages-my_packages_repo
Scheduled Syncs:
Distributors:
Auto Publish: True
Config:
Distributor Type Id: nodes_http_distributor
Id: mellow-my_packages-my_packages_repo_nodes
Last Publish: None
Repo Id: mellow-my_packages-my_packages_repo
Scheduled Publishes:
Auto Publish: False
Config:
Destination Distributor Id: mellow-my_packages-my_packages_repo
Distributor Type Id: yum_clone_distributor
Id: mellow-my_packages-my_packages_repo_clone
Last Publish: None
Repo Id: mellow-my_packages-my_packages_repo
Scheduled Publishes:
Auto Publish: True
Config:
Checksum Type: sha1
Http: True
Https: True
Protected: True
Relative URL: mellow/Library/custom/my_packages/my_packages_repo
Distributor Type Id: yum_distributor
Id: mellow-my_packages-my_packages_repo
Last Publish: 2015-12-04T17:26:50Z
Repo Id: mellow-my_packages-my_packages_repo

trying to modify the checksum directly on the capsule failed
[root@satellite6-mmello-capsule ~]# pulp-admin rpm repo update --repo-id mellow-Capsule_Contents-test_content_view_hash_repo-my_packages-my_packages_repo --checksum-type=sha1
This command may be exited via ctrl+c without affecting the request.

[\]
Running...

Task Failed

Missing resource(s): distributor=yum_distributor

============================

then removing repo on the capsule

[root@satellite6-mmello-capsule ~]# pulp-admin rpm repo delete --repo-id mellow-Capsule_Contents-test_content_view_hash_repo-my_packages-my_packages_repo
This command may be exited via ctrl+c without affecting the request.

[\]
Running...

Repository
[mellow-Capsule_Contents-test_content_view_hash_repo-my_packages-my_packages_repo] successfully deleted

--- then as expected, the client will not be able to get the repodata 
[root@dhcp-10-12-211-142 mellow_my_packages_my_packages_repo]# yum repolist -v
Not loading "rhnplugin" plugin, as it is disabled
Loading "package_upload" plugin
Loading "product-id" plugin
Loading "search-disabled-repos" plugin
Loading "subscription-manager" plugin
Updating Subscription Management repositories.
Config time: 0.318
Yum version: 3.4.3
https://satellite6-mmello-capsule.usersys.redhat.com/pulp/repos/mellow/Capsule_Contents/test_content_view_hash_repo/custom/my_packages/my_packages_repo/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
Trying other mirror.
To address this issue please refer to the below knowledge base article

https://access.redhat.com/articles/1320623

If above article doesn't help to resolve this issue please open a ticket with Red Hat Support.

One of the configured repositories failed (my_packages_repo),
and yum doesn't have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work "fix" this:
1. Contact the upstream for the repository and get them to fix the problem.
2. Reconfigure the baseurl/etc. for the repository, to point to a working
upstream. This is most often useful if you are using a newer
distribution release than is supported by the repository (and the
packages for the previous distribution release still work).
3. Disable the repository, so yum won't use it by default. Yum will then
just ignore the repository until you permanently enable it again or use
--enablerepo for temporary usage:
yum-config-manager --disable mellow_my_packages_my_packages_repo
4. Configure the failing repository to be skipped, if it is unavailable.
Note that yum will try to contact the repo. when it runs most commands,
so will have to try and fail each time (and thus. yum will be be much
slower). If it is a very temporary problem though, this is often a nice
compromise:
yum-config-manager --save --setopt=mellow_my_packages_my_packages_repo.skip_if_unavailable=true

failure: repodata/repomd.xml from mellow_my_packages_my_packages_repo: [Errno 256] No more mirrors to try.
https://satellite6-mmello-capsule.usersys.redhat.com/pulp/repos/mellow/Capsule_Contents/test_content_view_hash_repo/custom/my_packages/my_packages_repo/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found

==== syncing again with the new hash

hammer> capsule content synchronize --id 2
[...........................................................................................................] [100%]

hammer>

Destination Distributor Id: mellow-Capsule_Contents-test_content_view_hash_r
epo-my_packages-my_packages_repo
Distributor Type Id: yum_clone_distributor
Id: mellow-Capsule_Contents-test_content_view_hash_repo-my_pa
ckages-my_packages_repo_clone
Last Publish: None
Repo Id: mellow-Capsule_Contents-test_content_view_hash_repo-my_pa
ckages-my_packages_repo
Scheduled Publishes:
Auto Publish: True
Config:
Checksum Type: sha256
Http: True
Https: True
Protected: True
Relative URL: mellow/Capsule_Contents/test_content_view_hash_repo/custom/my
_packages/my_packages_repo
Distributor Type Id: yum_distributor
Id: mellow-Capsule_Contents-test_content_view_hash_repo-my_pa
ckages-my_packages_repo
Last Publish: 2015-12-04T19:16:12Z
Repo Id: mellow-Capsule_Contents-test_content_view_hash_repo-my_pa
ckages-my_packages_repo
Scheduled Publishes:

--- Additional comment from Marcelo Moreira de Mello on 2015-12-04 22:02:57 UTC ---

--- troubleshooting notes ---

even deleting the repository using pulp-admin on the capsule the repository does not get update.
as a final test, I created a fresh content view using the same repository with sha1 and the capsule got the sha1 content

Distributors:
Auto Publish: False
Config:
Destination Distributor Id: mellow-Capsule_Contents-test_directory_sha1-my_packages-my_packages_repo
Distributor Type Id: yum_clone_distributor
Id: mellow-Capsule_Contents-test_directory_sha1-my_packages-my_packages_repo_clone
Last Publish: None
Repo Id: mellow-Capsule_Contents-test_directory_sha1-my_packages-my_packages_repo
Scheduled Publishes:
Auto Publish: True
Config:
Checksum Type: sha1 <-- worked
Http: True
Https: True
Protected: True
Relative URL: mellow/Capsule_Contents/test_directory_sha1/custom/my_packages/my_packages_repo
Distributor Type Id: yum_distributor
Id: mellow-Capsule_Contents-test_directory_sha1-my_packages-my_packages_repo
Last Publish: 2015-12-04T19:51:33Z
Repo Id: mellow-Capsule_Contents-test_directory_sha1-my_packages-my_packages_repo
Scheduled Publishes:

/var/lib/pulp/published/yum/master/yum_distributor/mellow-Capsule_Contents-test_directory_sha1-my_packages-my_packages_repo/1449258693.34

[root@satellite6-mmello-capsule 1449258693.34]# date -d @1449258693.34
Fri Dec 4 14:51:33 EST 2015

[root@satellite6-mmello-capsule repodata]# ll
total 24
rw-r--r-. 1 apache apache 93 Dec 4 14:51 0514cb31e74da8395ecb813f92b910f9f9437edd-updateinfo.xml.gz
rw-r--r-. 1 apache apache 833 Dec 4 14:51 33f9d6d40218d358dd6e3efeb359568da2aec611-primary.xml.gz
rw-r--r-. 1 apache apache 130 Dec 4 14:51 406ca46e811cbb67669659067e496c49a203ebc8-comps.xml
rw-r--r-. 1 apache apache 329 Dec 4 14:51 96453eea6fceb614027c92e0f2e09c9e0f29c29a-filelists.xml.gz
rw-r--r-. 1 apache apache 751 Dec 4 14:51 e9db524f431e08f42035ef44d1eb29f9ffad5cc3-other.xml.gz
rw-r--r-. 1 apache apache 1790 Dec 4 14:51 repomd.xml

[root@satellite6-mmello-capsule repodata]# cat repomd.xml

<repomd xmlns="http://linux.duke.edu/metadata/repo&quot; xmlns:rpm="http://linux.duke.edu/metadata/rpm&quot;&gt;&lt;revision&gt;1449258693&lt;/revision>
<data type="filelists"><location href="repodata/96453eea6fceb614027c92e0f2e09c9e0f29c29a-filelists.xml.gz" /><timestamp>1449258693</timestamp><size>329</size><checksum type="sha1">96453eea6fceb614027c92e0f2e09c9e0f29c29a</checksum><open-size>557</open-size><open-checksum type="sha1">2d3c7785c8a9d39aee386ff02289d87e3e9596e9</open-checksum></data>
<data type="other"><location href="repodata/e9db524f431e08f42035ef44d1eb29f9ffad5cc3-other.xml.gz" /><timestamp>1449258693</timestamp><size>751</size><checksum type="sha1">e9db524f431e08f42035ef44d1eb29f9ffad5cc3</checksum><open-size>1858</open-size><open-checksum type="sha1">fd8523e7a14d77ff1b3f98cd9c232eec259d6084</open-checksum></data>
<data type="primary"><location href="repodata/33f9d6d40218d358dd6e3efeb359568da2aec611-primary.xml.gz" /><timestamp>1449258693</timestamp><size>833</size><checksum type="sha1">33f9d6d40218d358dd6e3efeb359568da2aec611</checksum><open-size>1766</open-size><open-checksum type="sha1">fee62a33fc03bb14fd52971e24aa9ac320baa808</open-checksum></data>
<data type="updateinfo"><location href="repodata/0514cb31e74da8395ecb813f92b910f9f9437edd-updateinfo.xml.gz" /><timestamp>1449258693</timestamp><size>93</size><checksum type="sha1">0514cb31e74da8395ecb813f92b910f9f9437edd</checksum><open-size>60</open-size><open-checksum type="sha1">3fcacfde981974f9a50c64ea59d042da898c45f1</open-checksum></data>
<data type="group"><location href="repodata/406ca46e811cbb67669659067e496c49a203ebc8-comps.xml" /><timestamp>1449258693</timestamp><size>130</size><checksum type="sha1">406ca46e811cbb67669659067e496c49a203ebc8</checksum></data>
</repomd>

--- Additional comment from RHEL Product and Program Management on 2015-12-04 22:14:24 UTC ---

Since this issue was entered in Red Hat Bugzilla, the pm_ack has been
set to + automatically for the next planned release

--- Additional comment from Brad Buckingham on 2015-12-08 18:29:53 UTC ---

Michael, can we get this cloned in to pulp redmine?

--- Additional comment from Michael Hrivnak on 2015-12-23 21:25:02 UTC ---

Jeff, can you file an upstream pulp bug based on your expertise in this area?

--- Additional comment from Jeff Ortel on 2016-01-05 22:12:34 UTC ---

This works for me upstream. Am I missing somthing?

------------- PARENT NODE -------------------

1. Created an 'r1' repository and enabled for nodes and did an initial node sync.

2. pulp-admin rpm repo update --repo-id=r1 --checksum-type=sha1

This command may be exited via ctrl+c without affecting the request.

[\]
Running...

Task Succeeded

3. pulp-admin repo list --details

--------------------------------------------------------------------
Repositories
--------------------------------------------------------------------

Id: r1
Display Name: r1
Description: None
Content Unit Counts:
Notes:
Importers:
Config:
Id: yum_importer
Importer Type Id: yum_importer
Last Sync: None
Repo Id: r1
Scheduled Syncs:
Distributors:
Auto Publish: True
Config:
Checksum Type: sha1 <-------------------------- HERE ---
Http: False
Https: True
Relative URL: r1
Distributor Type Id: yum_distributor
Id: yum_distributor
Last Publish: None
Repo Id: r1
Scheduled Publishes:
Auto Publish: True
Config:
Distributor Type Id: nodes_http_distributor
Id: nodes_http_distributor
Last Publish: 2016-01-05T21:24:04Z
Repo Id: r1
Scheduled Publishes:
Auto Publish: False
Config:
Http: False
Https: True
Distributor Type Id: export_distributor
Id: export_distributor
Last Publish: None
Repo Id: r1
Scheduled Publishes:

4. pulp-admin node sync run --node-id=node

Synchronization succeeded

--------------------------------------------------------------------
Child Node Synchronization
--------------------------------------------------------------------

Repository:
Action: Merged
Content Sources:
Downloads:
Total Sources: 0
Id: r1
Units:
Added: 0
Removed: 0
Updated: 0

------------- CHILD NODE -------------------

5. pulp-admin repo list --details

--------------------------------------------------------------------
Repositories
--------------------------------------------------------------------

Id: r1
Display Name: r1
Description: None
Content Unit Counts:
Notes:
Importers:
Config:
Manifest URL: https://fedora-21.os1.phx2.redhat.com/pulp/nodes/https/repos/r
1/manifest.json
Strategy: additive
Id: nodes_http_importer
Importer Type Id: nodes_http_importer
Last Sync: 2016-01-05T21:46:56Z
Repo Id: r1
Scheduled Syncs:
Distributors:
Auto Publish: True
Config:
Checksum Type: sha1 <----------------- HERE
Http: False
Https: True
Relative URL: r1
Distributor Type Id: yum_distributor
Id: yum_distributor
Last Publish: 2016-01-05T21:46:57Z
Repo Id: r1
Scheduled Publishes:
Auto Publish: False
Config:
Http: False
Https: True
Distributor Type Id: export_distributor
Id: export_distributor
Last Publish: None
Repo Id: r1
Scheduled Publishes:

----------- BACK ON PARENT NODE --------------

6. pulp-admin rpm repo update --repo-id=r1 --checksum-type=sha256

This command may be exited via ctrl+c without affecting the request.

[\]
Running...

Task Succeeded

7. pulp-admin node sync run --node-id=node

Synchronization succeeded

--------------------------------------------------------------------
Child Node Synchronization
--------------------------------------------------------------------

Repository:
Action: Merged
Content Sources:
Downloads:
Total Sources: 0
Id: r1
Units:
Added: 0
Removed: 0
Updated: 0

--------- BACK ON CHILD NODE --------------

8. pulp-admin repo list --details

--------------------------------------------------------------------
Repositories
--------------------------------------------------------------------

Id: r1
Display Name: r1
Description: None
Content Unit Counts:
Notes:
Importers:
Config:
Manifest URL: https://fedora-21.os1.phx2.redhat.com/pulp/nodes/https/repos/r
1/manifest.json
Strategy: additive
Id: nodes_http_importer
Importer Type Id: nodes_http_importer
Last Sync: 2016-01-05T21:46:56Z
Repo Id: r1
Scheduled Syncs:
Distributors:
Auto Publish: True
Config:
Checksum Type: sha256 <--------------- UPDATED HERE ----
Http: False
Https: True
Relative URL: r1
Distributor Type Id: yum_distributor
Id: yum_distributor
Last Publish: 2016-01-05T21:46:57Z
Repo Id: r1
Scheduled Publishes:
Auto Publish: False
Config:
Http: False
Https: True
Distributor Type Id: export_distributor
Id: export_distributor
Last Publish: None
Repo Id: r1
Scheduled Publishes:

--- Additional comment from Bryan Kearney on 2016-01-21 13:51:18 UTC ---

puuting needinfo back on michael.

--- Additional comment from Bryan Kearney on 2016-01-26 13:55:21 UTC ---

Moving this out of 6.1.7 due to capacity issues. Will keep it on the 6.1.z and 6.2 trackers to ensure that it is evaluated for both.

--- Additional comment from Michael Hrivnak on 2016-02-18 18:44:57 UTC ---

It looks like Jeff has shown the correct behavior on upstream pulp, and could not reproduce the problem. There are two options for how to proceed:

1) Since it's aligned to 6.2 now, which won't use nodes, pulp will no longer be managing the consistency of this setting from parent to capsule. So you could just ensure that the use case is covered in 6.2, and close this.

2) Gather more information, with help from someone on katello, about what calls were made to the parent and child pulp nodes, and figure out where there might be a gap.

Generally speaking, everyone should be using sha256 unless they're accessing the repo with very old clients (like anaconda from rhel 5) that can only do sha1. We don't recommend changing the checksum type on a repo after creation.

--- Additional comment from Bryan Kearney on 2016-02-18 20:31:14 UTC ---

I am going to move this to 6.2 for veriifcation there. Marcello, if you are still seeing this please reach out to me over email.

--- Additional comment from Bryan Kearney on 2016-02-26 15:38:30 UTC ---

This bug was included in SNAP1 which was delivered on 25 February, 2016.

--- Additional comment from Tom McKay on 2016-03-28 14:02:54 UTC ---

From user on IRC:

<jbberry> thomasmckay: I found what happens. If the upstream repo you're syncing from has SHA256 in it's repodata, any SHA1 setting you put in Sat6 is ignored and it stays sha256
<jbberry> thomasmckay: so my custom repo for RHEL5, I accidentally did createrepo without sha1 checksum, and had Sat6 syncing from that repo; since upstream was 256, sat6 kept it 256
<jbberry> thomasmckay: only way to properly recover is to totally trash that product, and rebuild that product and content views from scratch
<jbberry> thomasmckay: I cant see anything for that bug, but might be worth adding these ^^ notes in; I've randomly hit this issue many times, and finally this weekend I was able to track down this exact flow of how it happened. and no amount of flags/publishes in Sat6 resolves it.
<jbberry> thomasmckay: even if i change upstream to sha1 and tell Sat6 to resync, it then starts duplicating packages. I didn't dig into this one, but best guess is sat6 doesn't recognize them as the same package because it's comparing sha1 checksums to sha256 checksums. So then my product repo doubles in size

--- Additional comment from errata-xmlrpc on 2016-03-31 07:41:55 UTC ---

This bug has been dropped from advisory RHEA-2016:23110 by Martin Prpic ()

--- Additional comment from Kedar Bidarkar on 2016-04-19 18:23:17 UTC ---

From Satellite box:

[root@katello1 repodata]# cat repomd.xml | grep -i sha256 | wc -l
0
[root@katello1 repodata]# cat repomd.xml | grep -i sha1 | wc -l
5

From Capsule box after sync:

[root@katello1 repodata]# cat repomd.xml | grep -i sha1 | wc -l
0
[root@katello1 repodata]# cat repomd.xml | grep -i sha256 | wc -l
5

From comment 13 it looks like this is expected, but still as per the initial bug description goes, this bug fails for that.

TESTED with sat62-snap8.1

--- Additional comment from Brad Buckingham on 2016-04-21 13:30:33 UTC ---

Since this bug was a non-blocker for Beta and it failedqa, it was moved to GA.

--- Additional comment from Brad Buckingham on 2016-05-09 19:03:06 UTC ---

Can you have someone on pulp investigate this on Satellite 6.2 Beta?

If you need assistance, please ping jomitsch.

--- Additional comment from Bryan Kearney on 2016-05-13 17:33:18 UTC ---

MOved to zStream based on conversaion with GSS, QE, PM and ENG

--- Additional comment from Bryan Kearney on 2016-05-31 16:43:44 UTC ---

Pushing out one zStream based on discussions with PM, GSS, and QE.

--- Additional comment from Michael Hrivnak on 2016-06-08 15:26:13 UTC ---

As of 6.2, pulp no longer manages the propagation of repo settings from server to capsule. That's was changed when we stopped using the pulp_nodes feature, and katello now manages those settings.

If this is still a problem, I suggest changing the component to something besides Pulp.

--- Additional comment from Justin Sherrill on 2016-06-11 01:17:20 UTC ---

I did test this and this is not resolved in 6.2.0.

--- Additional comment from Justin Sherrill on 2016-06-11 02:14:26 UTC ---

Created redmine issue http://projects.theforeman.org/issues/15377 from this bug

--- Additional comment from errata-xmlrpc on 2016-07-27 01:12:14 UTC ---

Bug report changed to RELEASE_PENDING status by Errata System.
Advisory RHBA-2016:23297-07 has been changed to PUSH_READY status.
https://errata.devel.redhat.com/advisory/23297

--- Additional comment from errata-xmlrpc on 2016-07-27 09:21:21 UTC ---

Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2016:1501

--- Additional comment from Brad Buckingham on 2016-08-11 13:57:29 UTC ---

This bugzilla was incorrectly transitioned to CLOSED. Placing it back in POST so that it may be included in a future z-stream.

--- Additional comment from on 2016-09-14 03:44:26 UTC ---

Failed QA in Satellite 6.2.2 Snap 1.1.

Created two repos, one with sha1 and the other with sha256. While everything works correctly on the Satellite side, the checksum is not updated on the capsule.

We see that satellite correctly overrides the repo's original checksum type.

+++++Original+++++++

testrepo2 (created with sha1 - repo in satellite using sha256)
--------------------------------------------------------------
[root@wolverine repodata]# cat repomd.xml | grep -i sha
<data type="filelists"><location href="repodata/a79cebdcc1f65446f974011f07478e692f43c08e7b06b8a30c0c6e8769257585-filelists.xml.gz" /><timestamp>1473818624</timestamp><size>1606</size><checksum type="sha256">a79cebdcc1f65446f974011f07478e692f43c08e7b06b8a30c0c6e8769257585</checksum><open-size>11203</open-size><open-checksum type="sha256">572ff4f2f070b1b0d469f66226f88fe29714744b9113fad83dd18400ffea7fa6</open-checksum></data>
<data type="other"><location href="repodata/925bb39e9eb7b88c21d305202aa7018165192277338b5d4bd701cc09576c0ffe-other.xml.gz" /><timestamp>1473818624</timestamp><size>1925</size><checksum type="sha256">925bb39e9eb7b88c21d305202aa7018165192277338b5d4bd701cc09576c0ffe</checksum><open-size>11426</open-size><open-checksum type="sha256">6b49b05be34054d14a33af2c4de2a3f858ca67c7edcb70bd67dc303548456684</open-checksum></data>
<data type="primary"><location href="repodata/75851b587b70bc8a318f47c2c9053e72b4c014be81cd13cc3682213242650fd3-primary.xml.gz" /><timestamp>1473818624</timestamp><size>2886</size><checksum type="sha256">75851b587b70bc8a318f47c2c9053e72b4c014be81cd13cc3682213242650fd3</checksum><open-size>19729</open-size><open-checksum type="sha256">fb7115261431e110cf6fbc5987181532cbfd58f57e1c2b078e60941535db4552</open-checksum></data>
<data type="updateinfo"><location href="repodata/1c5fca465f7b73ac7f1c3c67cbb9915186fb3288984de8e5f7d8ad226f22b40f-updateinfo.xml.gz" /><timestamp>1473818624</timestamp><size>93</size><checksum type="sha256">1c5fca465f7b73ac7f1c3c67cbb9915186fb3288984de8e5f7d8ad226f22b40f</checksum><open-size>58</open-size><open-checksum type="sha256">5d01904445a7034ca973c12fb62f8a56e02a2aeb011496fa83da1f26f49371ca</open-checksum></data>
<data type="group"><location href="repodata/3e800f8eb4bfc89f8e320cda3dd709a8e0bef5f4884e3b622df63b17249e8242-comps.xml" /><timestamp>1473818624</timestamp><size>130</size><checksum type="sha256">3e800f8eb4bfc89f8e320cda3dd709a8e0bef5f4884e3b622df63b17249e8242</checksum></data>

testrepo3 (created with sha256 - repo in satellite using sha1)
--------------------------------------------------------------
[root@wolverine repodata]# cat repomd.xml | grep -i sha
<data type="filelists"><location href="repodata/760318cfd2a916ec0a27adf567cd7217b67219c2-filelists.xml.gz" /><timestamp>1473818775</timestamp><size>1729</size><checksum type="sha1">760318cfd2a916ec0a27adf567cd7217b67219c2</checksum><open-size>11371</open-size><open-checksum type="sha1">626fbe03df6ac661cfe32bfa3b5c633e383f5a33</open-checksum></data>
<data type="other"><location href="repodata/be21d09649ff8bee928fe125eb1aae4dc3270652-other.xml.gz" /><timestamp>1473818775</timestamp><size>2035</size><checksum type="sha1">be21d09649ff8bee928fe125eb1aae4dc3270652</checksum><open-size>11594</open-size><open-checksum type="sha1">c267095b31a73d1513a4dab042d4778e578803f0</open-checksum></data>
<data type="primary"><location href="repodata/560ce77ba51740d66fc7a221e8ef2ceca504906d-primary.xml.gz" /><timestamp>1473818775</timestamp><size>3013</size><checksum type="sha1">560ce77ba51740d66fc7a221e8ef2ceca504906d</checksum><open-size>19911</open-size><open-checksum type="sha1">e9f2145ba2aea50c4a58dc0984c6f8cadfbf425e</open-checksum></data>
<data type="updateinfo"><location href="repodata/6056cde6e059d81264690e4d22e7e3752f10c4fb-updateinfo.xml.gz" /><timestamp>1473818776</timestamp><size>93</size><checksum type="sha1">6056cde6e059d81264690e4d22e7e3752f10c4fb</checksum><open-size>58</open-size><open-checksum type="sha1">9d65415ae7cc4f506ce1efc0a2d8a955d10c5ac1</open-checksum></data>
<data type="group"><location href="repodata/406ca46e811cbb67669659067e496c49a203ebc8-comps.xml" /><timestamp>1473818776</timestamp><size>130</size><checksum type="sha1">406ca46e811cbb67669659067e496c49a203ebc8</checksum></data>

+++++After Change (Satellite)+++++++

testrepo2 changed to sha1
-------------------------
[root@mgmt5 repodata]# cat repomd.xml | grep -i sha
<data type="filelists"><location href="repodata/8755fd3cfe8c73d8f1ee5c2ab1b901f51a7f9ef5-filelists.xml.gz"/><timestamp>1473821505</timestamp><size>1612</size><checksum type="sha1">8755fd3cfe8c73d8f1ee5c2ab1b901f51a7f9ef5</checksum><open-size>11203</open-size><open-checksum type="sha1">eff7abc82c8b79729fe2188c3117912257c33d53</open-checksum></data>
<data type="other"><location href="repodata/f782c9dfa7a37860fa9d1ec9bfc16fd5364ccafe-other.xml.gz"/><timestamp>1473821505</timestamp><size>1933</size><checksum type="sha1">f782c9dfa7a37860fa9d1ec9bfc16fd5364ccafe</checksum><open-size>11426</open-size><open-checksum type="sha1">128818520c5eb28eb53ecf30fe56fdafc3bf35c2</open-checksum></data>
<data type="primary"><location href="repodata/814636e0dfbe1534dab25399afcc397544bc1eb3-primary.xml.gz"/><timestamp>1473821505</timestamp><size>2911</size><checksum type="sha1">814636e0dfbe1534dab25399afcc397544bc1eb3</checksum><open-size>19729</open-size><open-checksum type="sha1">5e794b3553e02005e2892f4b3db25cb833e4be46</open-checksum></data>
<data type="updateinfo"><location href="repodata/086721578f942e478111328bed5290fd45721418-updateinfo.xml.gz"/><timestamp>1473821505</timestamp><size>93</size><checksum type="sha1">086721578f942e478111328bed5290fd45721418</checksum><open-size>58</open-size><open-checksum type="sha1">9d65415ae7cc4f506ce1efc0a2d8a955d10c5ac1</open-checksum></data>
<data type="group"><location href="repodata/406ca46e811cbb67669659067e496c49a203ebc8-comps.xml"/><timestamp>1473821505</timestamp><size>130</size><checksum type="sha1">406ca46e811cbb67669659067e496c49a203ebc8</checksum></data>

testrepo3 changed to sha256
---------------------------
[root@mgmt5 repodata]# cat repomd.xml | grep -i sha
<data type="filelists"><location href="repodata/b24c41d217ca205b09dd5ec767f0beb42f46888cb8b28162ac0d085b3862d173-filelists.xml.gz"/><timestamp>1473821507</timestamp><size>1729</size><checksum type="sha256">b24c41d217ca205b09dd5ec767f0beb42f46888cb8b28162ac0d085b3862d173</checksum><open-size>11371</open-size><open-checksum type="sha256">7ee7080b70c44462fa2a64429b05bc49bc2c8be674c2e4e04a4083bd8b6dd3b7</open-checksum></data>
<data type="other"><location href="repodata/f8e70e16833a207ffb721fe2bf9eec331b4c5b65319a13eda2f464ed083ca125-other.xml.gz"/><timestamp>1473821507</timestamp><size>2032</size><checksum type="sha256">f8e70e16833a207ffb721fe2bf9eec331b4c5b65319a13eda2f464ed083ca125</checksum><open-size>11594</open-size><open-checksum type="sha256">474b9180d750647095b567609b4288f4d7c6c952f3ca420c80e71995a0cfeb23</open-checksum></data>
<data type="primary"><location href="repodata/e50b2955b1f3f9a274bc90ec39bce24c2e84cd376e2480ec0375a0de05ae897a-primary.xml.gz"/><timestamp>1473821507</timestamp><size>3023</size><checksum type="sha256">e50b2955b1f3f9a274bc90ec39bce24c2e84cd376e2480ec0375a0de05ae897a</checksum><open-size>19911</open-size><open-checksum type="sha256">296544ec83c6b257d87d8550e0d3b6d12f12ae512d10a0f01ef4d4ef62a03cdf</open-checksum></data>
<data type="updateinfo"><location href="repodata/5b52250205adcbcf8d1bf7d79fc220d7b877b11b63ef2da6395486f354a27de3-updateinfo.xml.gz"/><timestamp>1473821507</timestamp><size>93</size><checksum type="sha256">5b52250205adcbcf8d1bf7d79fc220d7b877b11b63ef2da6395486f354a27de3</checksum><open-size>58</open-size><open-checksum type="sha256">5d01904445a7034ca973c12fb62f8a56e02a2aeb011496fa83da1f26f49371ca</open-checksum></data>
<data type="group"><location href="repodata/3e800f8eb4bfc89f8e320cda3dd709a8e0bef5f4884e3b622df63b17249e8242-comps.xml"/><timestamp>1473821507</timestamp><size>130</size><checksum type="sha256">3e800f8eb4bfc89f8e320cda3dd709a8e0bef5f4884e3b622df63b17249e8242</checksum></data>

+++++After Change (Capsule)+++++++

testrepo2 NOT changed to sha1
-----------------------------
[root@wolverine repodata]# cat repomd.xml | grep -i sha
<data type="filelists"><location href="repodata/1c073ebd2e4558e012e7d51c7337b4ad32f5b3a1a2ff4b3c5aae0a0ccf31c4cd-filelists.xml.gz" /><timestamp>1473823567</timestamp><size>1606</size><checksum type="sha256">1c073ebd2e4558e012e7d51c7337b4ad32f5b3a1a2ff4b3c5aae0a0ccf31c4cd</checksum><open-size>11203</open-size><open-checksum type="sha256">572ff4f2f070b1b0d469f66226f88fe29714744b9113fad83dd18400ffea7fa6</open-checksum></data>
<data type="other"><location href="repodata/1f028edbb56706cf62cfd4b84cbe5fbad5d2e85d17909433b66b0166b939d8b2-other.xml.gz" /><timestamp>1473823567</timestamp><size>1925</size><checksum type="sha256">1f028edbb56706cf62cfd4b84cbe5fbad5d2e85d17909433b66b0166b939d8b2</checksum><open-size>11426</open-size><open-checksum type="sha256">6b49b05be34054d14a33af2c4de2a3f858ca67c7edcb70bd67dc303548456684</open-checksum></data>
<data type="primary"><location href="repodata/e6bcc2fbc908667b1814c12c947a99e6db70bdda09d955749ee8cdd4d812267c-primary.xml.gz" /><timestamp>1473823567</timestamp><size>2886</size><checksum type="sha256">e6bcc2fbc908667b1814c12c947a99e6db70bdda09d955749ee8cdd4d812267c</checksum><open-size>19729</open-size><open-checksum type="sha256">fb7115261431e110cf6fbc5987181532cbfd58f57e1c2b078e60941535db4552</open-checksum></data>
<data type="updateinfo"><location href="repodata/237e321d2306e7e6e20249ecfc11b5b7a328dd1f5de8a6055823d63817f92abf-updateinfo.xml.gz" /><timestamp>1473823567</timestamp><size>93</size><checksum type="sha256">237e321d2306e7e6e20249ecfc11b5b7a328dd1f5de8a6055823d63817f92abf</checksum><open-size>58</open-size><open-checksum type="sha256">5d01904445a7034ca973c12fb62f8a56e02a2aeb011496fa83da1f26f49371ca</open-checksum></data>
<data type="group"><location href="repodata/3e800f8eb4bfc89f8e320cda3dd709a8e0bef5f4884e3b622df63b17249e8242-comps.xml" /><timestamp>1473823568</timestamp><size>130</size><checksum type="sha256">3e800f8eb4bfc89f8e320cda3dd709a8e0bef5f4884e3b622df63b17249e8242</checksum></data>

testrepo3 NOT changed to sha256
-------------------------------
[root@wolverine repodata]# cat repomd.xml | grep -i sha
<data type="filelists"><location href="repodata/8ba288a2b548ed81aaa566a42ecef15f7842f32b-filelists.xml.gz" /><timestamp>1473823549</timestamp><size>1729</size><checksum type="sha1">8ba288a2b548ed81aaa566a42ecef15f7842f32b</checksum><open-size>11371</open-size><open-checksum type="sha1">626fbe03df6ac661cfe32bfa3b5c633e383f5a33</open-checksum></data>
<data type="other"><location href="repodata/cb3ff5076605e9163638df7a6a2bbbafebf72949-other.xml.gz" /><timestamp>1473823549</timestamp><size>2035</size><checksum type="sha1">cb3ff5076605e9163638df7a6a2bbbafebf72949</checksum><open-size>11594</open-size><open-checksum type="sha1">c267095b31a73d1513a4dab042d4778e578803f0</open-checksum></data>
<data type="primary"><location href="repodata/0f9794d6c3201d67671d906603db5101402e24dc-primary.xml.gz" /><timestamp>1473823549</timestamp><size>3013</size><checksum type="sha1">0f9794d6c3201d67671d906603db5101402e24dc</checksum><open-size>19911</open-size><open-checksum type="sha1">e9f2145ba2aea50c4a58dc0984c6f8cadfbf425e</open-checksum></data>
<data type="updateinfo"><location href="repodata/03396650df3e3002f88218df2beb3e517ef6cf1b-updateinfo.xml.gz" /><timestamp>1473823549</timestamp><size>93</size><checksum type="sha1">03396650df3e3002f88218df2beb3e517ef6cf1b</checksum><open-size>58</open-size><open-checksum type="sha1">9d65415ae7cc4f506ce1efc0a2d8a955d10c5ac1</open-checksum></data>
<data type="group"><location href="repodata/406ca46e811cbb67669659067e496c49a203ebc8-comps.xml" /><timestamp>1473823549</timestamp><size>130</size><checksum type="sha1">406ca46e811cbb67669659067e496c49a203ebc8</checksum></data>

--- Additional comment from Bryan Kearney on 2016-09-14 11:40:55 UTC ---

Was not verified in 6.2. Moving out.

--- Additional comment from Justin Sherrill on 2016-09-14 15:02:16 UTC ---

Connecting redmine issue http://projects.theforeman.org/issues/16559 from this bug

--- Additional comment from Justin Sherrill on 2016-09-14 15:04:25 UTC ---

Dug into the failure and it actually uncovered a new issue. It appears the capsule syncing was actually propagating the checksum properly, however when publishing a content view we do not properly update the repo in a lifecycle environment with the new checksum.

This is masked by our optimization of copying repo metadata from library, as that would make it appear that the repo is configured properly for the new checksum, when in fact pulp is still set to the old checksum.

If you used a single content view filter, you would see the content view copy of the repo not be updated properly.

--- Additional comment from Bryan Kearney on 2016-09-14 16:19:44 UTC ---

Upstream bug component is Content Views

--- Additional comment from Bryan Kearney on 2016-10-03 16:29:59 UTC ---

I am moving all bugs which have been addressed in either katello 3.2 or foreman 13.0 and 13.1 to ON_QA. These bugs have been delivered in the first 3 snaps.

--- Additional comment from Bryan Kearney on 2016-10-03 16:53:57 UTC ---

Moving all bugs which are fixed in Katello 3.2 to ON_QA for 6.3. These were delivered in the initial snaps of 6.3.

--- Additional comment from Marcelo Moreira de Mello on 2016-10-26 21:02:57 UTC ---

=== In Red Hat Customer Portal Case 01710181 ===
--- Comment by Moreira de Mello, Marcelo on 10/26/2016 5:01 PM ---

--hotfix test for bz#1389063

https://github.com/Katello/katello/pull/6412/files

  1. cp /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.80/app/models/katello/rhsm_fact_parser.rb /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.80/app/models/katello/rhsm_fact_parser.rb.orig
  1. diff ruN /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.80/app/models/katello/rhsm_fact_parser.rb.orig /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.80/app/models/katello/rhsm_fact_parser.rb
    --
    /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.80/app/models/katello/rhsm_fact_parser.rb.orig 2016-10-26 16:40:49.407129152 -0400
    +++ /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.80/app/models/katello/rhsm_fact_parser.rb 2016-10-26 16:43:19.900437073 -0400
    @ -22,8 +22,8 @
    def get_facts_for_interface(interface) {
    'link' => true,
    - 'macaddress' => facts["net.interface.#{interface}.mac_address"],
    - 'ipaddress' => facts["net.interface.#{interface}.ipv4_address"]
    + 'macaddress' => get_rhsm_mac(interface),
    + 'ipaddress' => get_rhsm_ip(interface)
    }
    end

@ -71,5 +71,18 @

def ipmi_interface
end

private

def get_rhsm_ip(interface)
+ ip = facts["net.interface.#{interface}.ipv4_address"]
+ Net::Validations.validate_ip(ip) ? ip : nil
+ end

def get_rhsm_mac(interface)
+ Net::Validations.normalize_mac(facts["net.interface.#{interface}.mac_address"])
+ rescue Net::Validations::Error
+ nil
+ end
end
end

[root@inhas62145 ~]# cat << EOF >> /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.80/db/migrate/20161026191118_fix_invalid_interfaces.rb
class FixInvalidInterfaces < ActiveRecord::Migration
class FakeNic < ActiveRecord::Base
self.table_name = 'nics'

def type
Nic::Base
end
end
def up
FakeNic.where(:ip => "Unknown").each do |nic|
nic.update_attributes(:ip => nil)
end
FakeNic.where(:mac => "Unknown").each do |nic|
nic.update_attributes(:mac => nil)
end
end
end
EOF

--- before applying it

foreman=# select count(*) from nics where ip = 'Unknown';
count
-------
403
(1 row)

foreman=# select count(*) from nics where mac = 'Unknown';
count
-------
0
(1 row)

--- applying it
  1. foreman-rake db:migrate --trace
    • Invoke db:migrate (first_time)
    • Invoke environment (first_time)
    • Execute environment
    • Invoke db:load_config (first_time)
    • Execute db:load_config
    • Execute db:migrate
      20161026191118 FixInvalidInterfaces: migrating ===========================
      20161026191118 FixInvalidInterfaces: migrated (0.4278s) ==================

foreman=# select count(*) from nics where ip = 'Unknown';
count
-------
0
(1 row)

foreman=# select count(*) from nics where mac = 'Unknown';
count
-------
0
(1 row)

  1. katello-service restart

After that, trying to execute the remote command worked as expected.

stbenjam++

--- Additional comment from on 2016-12-07 18:19:53 UTC ---

Verified in Satellite 6.2.5

*Original Repo*
Satellite
---------
-bash-4.2# cat repomd.xml | grep -i sha
<data type="filelists"><location href="repodata/0a2b32ffc2617e976246f52f2d00f97e8652c2ecdd78e8cd84c97bc22d248411-filelists.xml.gz" /><timestamp>1481123254</timestamp><size>473340</size><checksum type="sha256">0a2b32ffc2617e976246f52f2d00f97e8652c2ecdd78e8cd84c97bc22d248411</checksum><open-size>8992305</open-size><open-checksum type="sha256">dbbc13c46cbee0c9ddc99cc4725fe42c343669396e1f28ffa0d7dc65e20f2648</open-checksum></data>
<data type="other"><location href="repodata/ea2ce19986deab3aa94388b76bca84327605d8dab8c32e6ce6711296a4ae5cc1-other.xml.gz" /><timestamp>1481123255</timestamp><size>100416</size><checksum type="sha256">ea2ce19986deab3aa94388b76bca84327605d8dab8c32e6ce6711296a4ae5cc1</checksum><open-size>528554</open-size><open-checksum type="sha256">e474d12d2f9af678e7011eccc05d319fd74bfc267337ac9579f925896e9f08c7</open-checksum></data>
<data type="primary"><location href="repodata/c3ba2dbb90497f3b12fac7551168179c2cdb0c7dacee6101634346f47e66b9c7-primary.xml.gz" /><timestamp>1481123255</timestamp><size>92446</size><checksum type="sha256">c3ba2dbb90497f3b12fac7551168179c2cdb0c7dacee6101634346f47e66b9c7</checksum><open-size>612346</open-size><open-checksum type="sha256">a9aa7d93fab7fbc44c89fedc62f4dddbba7e75be1ce3f3b0bbecd3d354bf0827</open-checksum></data>
<data type="updateinfo"><location href="repodata/81386cccf3d8dc59daf3e5c086f59c4e6cd58ff6954bf1e65a2f427dfe35801e-updateinfo.xml.gz" /><timestamp>1481123255</timestamp><size>93</size><checksum type="sha256">81386cccf3d8dc59daf3e5c086f59c4e6cd58ff6954bf1e65a2f427dfe35801e</checksum><open-size>58</open-size><open-checksum type="sha256">5d01904445a7034ca973c12fb62f8a56e02a2aeb011496fa83da1f26f49371ca</open-checksum></data>
<data type="group"><location href="repodata/056d0c92d80ac6be99d7152e0b91d63bfee1d662d555a33bf2b6936ac4bd1c1e-comps.xml" /><timestamp>1481123255</timestamp><size>2651</size><checksum type="sha256">056d0c92d80ac6be99d7152e0b91d63bfee1d662d555a33bf2b6936ac4bd1c1e</checksum></data>

Capsule
-------
-bash-4.2# cat repomd.xml | grep -i sha
<data type="filelists"><location href="repodata/e6bf84613a8a2e8abacff959c888ebbab375fb0e2c908a0327497c18ee96c660-filelists.xml.gz" /><timestamp>1481127778</timestamp><size>475768</size><checksum type="sha256">e6bf84613a8a2e8abacff959c888ebbab375fb0e2c908a0327497c18ee96c660</checksum><open-size>8992304</open-size><open-checksum type="sha256">0a552a4348a18cec0343588660d9d793ef2932e6d73334ce6ea608a2eea86a5c</open-checksum></data>
<data type="other"><location href="repodata/7a36d156c5868a60874a58ff00cdb87797b50484106f74f219ff1368335e6428-other.xml.gz" /><timestamp>1481127779</timestamp><size>99591</size><checksum type="sha256">7a36d156c5868a60874a58ff00cdb87797b50484106f74f219ff1368335e6428</checksum><open-size>528553</open-size><open-checksum type="sha256">025a255c3c82287aea798a2b4254fa7123d7405b649af6daf51c5f60e4105789</open-checksum></data>
<data type="primary"><location href="repodata/71eafff5eeec06fc0bd4c64d852bad82e33cc579fee85876ecd4651dd4e89f53-primary.xml.gz" /><timestamp>1481127779</timestamp><size>91920</size><checksum type="sha256">71eafff5eeec06fc0bd4c64d852bad82e33cc579fee85876ecd4651dd4e89f53</checksum><open-size>612345</open-size><open-checksum type="sha256">fcbe7109ca110ed65e126e40797e5ccddc656e33c3afcdf1e9152b9b10a9379f</open-checksum></data>
<data type="updateinfo"><location href="repodata/87400ea3513a543bd0d923768e8fd1d3800ba11e24e0c1220be04c907bf884dc-updateinfo.xml.gz" /><timestamp>1481127779</timestamp><size>93</size><checksum type="sha256">87400ea3513a543bd0d923768e8fd1d3800ba11e24e0c1220be04c907bf884dc</checksum><open-size>58</open-size><open-checksum type="sha256">5d01904445a7034ca973c12fb62f8a56e02a2aeb011496fa83da1f26f49371ca</open-checksum></data>
<data type="group"><location href="repodata/056d0c92d80ac6be99d7152e0b91d63bfee1d662d555a33bf2b6936ac4bd1c1e-comps.xml" /><timestamp>1481127779</timestamp><size>2651</size><checksum type="sha256">056d0c92d80ac6be99d7152e0b91d63bfee1d662d555a33bf2b6936ac4bd1c1e</checksum></data>

*After Update to sha1*
Satellite
---------
-bash-4.2# cat repomd.xml | grep -i sha
<data type="filelists"><location href="repodata/522f022fb8fcc603b03eda18e023795021221efd-filelists.xml.gz" /><timestamp>1481130110</timestamp><size>473340</size><checksum type="sha1">522f022fb8fcc603b03eda18e023795021221efd</checksum><open-size>8992305</open-size><open-checksum type="sha1">4d58e721586437f4d02848e92d3927986a80c182</open-checksum></data>
<data type="other"><location href="repodata/c5c7c3631134cbebb6569b33b98dd5ad1068be9d-other.xml.gz" /><timestamp>1481130110</timestamp><size>100416</size><checksum type="sha1">c5c7c3631134cbebb6569b33b98dd5ad1068be9d</checksum><open-size>528554</open-size><open-checksum type="sha1">a469cc76e1e23da89abd93dc17db7b847d9445aa</open-checksum></data>
<data type="primary"><location href="repodata/661018e02c3b057d525962bb7f2db5d392ba1414-primary.xml.gz" /><timestamp>1481130110</timestamp><size>92446</size><checksum type="sha1">661018e02c3b057d525962bb7f2db5d392ba1414</checksum><open-size>612346</open-size><open-checksum type="sha1">c3344bbf84e93269861875f2785cd398c9e0923f</open-checksum></data>
<data type="updateinfo"><location href="repodata/3570fe4264972d8abcd4a5d644b83debeea73308-updateinfo.xml.gz" /><timestamp>1481130111</timestamp><size>93</size><checksum type="sha1">3570fe4264972d8abcd4a5d644b83debeea73308</checksum><open-size>58</open-size><open-checksum type="sha1">9d65415ae7cc4f506ce1efc0a2d8a955d10c5ac1</open-checksum></data>
<data type="group"><location href="repodata/45c6b704b7fc94eeb58611a44676bbf6fc908b6b-comps.xml" /><timestamp>1481130111</timestamp><size>2651</size><checksum type="sha1">45c6b704b7fc94eeb58611a44676bbf6fc908b6b</checksum></data>

Capsule
-------
-bash-4.2# cat repomd.xml | grep -i sha
<data type="filelists"><location href="repodata/156d52cc752426d3600696bc3ea0765140a6f167-filelists.xml.gz" /><timestamp>1481130356</timestamp><size>475768</size><checksum type="sha1">156d52cc752426d3600696bc3ea0765140a6f167</checksum><open-size>8992304</open-size><open-checksum type="sha1">6a16501e4907af6c8f93f569e07d22634ae44d01</open-checksum></data>
<data type="other"><location href="repodata/78920abff0fb0bef9f95449c4e19b05cf5c20d2e-other.xml.gz" /><timestamp>1481130356</timestamp><size>99591</size><checksum type="sha1">78920abff0fb0bef9f95449c4e19b05cf5c20d2e</checksum><open-size>528553</open-size><open-checksum type="sha1">8b9373d56e4176b66e61f7efe2ab406902012562</open-checksum></data>
<data type="primary"><location href="repodata/954c8e6e2d2fff472ea53defc841f0dca381303a-primary.xml.gz" /><timestamp>1481130356</timestamp><size>91920</size><checksum type="sha1">954c8e6e2d2fff472ea53defc841f0dca381303a</checksum><open-size>612345</open-size><open-checksum type="sha1">125b33f0e26860dedf1fe6b8ba55014197a7e4ce</open-checksum></data>
<data type="updateinfo"><location href="repodata/9d1d89433981d373191caaba5ed2f0686913e46f-updateinfo.xml.gz" /><timestamp>1481130357</timestamp><size>93</size><checksum type="sha1">9d1d89433981d373191caaba5ed2f0686913e46f</checksum><open-size>58</open-size><open-checksum type="sha1">9d65415ae7cc4f506ce1efc0a2d8a955d10c5ac1</open-checksum></data>
<data type="group"><location href="repodata/45c6b704b7fc94eeb58611a44676bbf6fc908b6b-comps.xml" /><timestamp>1481130357</timestamp><size>2651</size><checksum type="sha1">45c6b704b7fc94eeb58611a44676bbf6fc908b6b</checksum></data>

--- Additional comment from Bryan Kearney on 2016-12-12 18:48:06 UTC ---

Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2016:2940

--- Additional comment from Bryan Kearney on 2016-12-12 18:48:12 UTC ---

Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2016:2940

--- Additional comment from Brad Buckingham on 2017-01-10 22:18:55 UTC ---

Actions #1

Updated by The Foreman Bot over 5 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/7932 added
Actions #2

Updated by The Foreman Bot over 5 years ago

  • Assignee set to Samir Jha
Actions #3

Updated by John Mitsch over 5 years ago

  • Subject changed from checksum-type does not updated on already synced repository at Satellite Capsule. to checksum-type does not updated on already synced repository at Katello Capsule.
  • Target version set to Katello 3.11.1
  • Triaged changed from No to Yes
Actions #4

Updated by Anonymous about 5 years ago

  • Status changed from Ready For Testing to Closed
Actions

Also available in: Atom PDF