Project

General

Profile

action #157657

Updated by jlausuch about 2 months ago

## Problem statement: 
 When registering the system using ProxySCC, activating the PackageHub module returns repos in OSD that don't exist. 
 This is expected, because the proxySCC replaces the repo URLs given by the real SCC by local openQA asset URL. 

 Normally, we use the proxySCC in the openQA jobs with `SCC_URL` variable, this will be used by the code to make the `SUSEConnect` call like this: 

 `SUSEConnect -r $REGCODE --url http://all-67.1.proxy.scc.suse.de` 

 This will make that all the repos returned look like this: 
 `http://openqa.suse.de/assets/repo/...` 

 And enabling any module, will have the same effect, for example PackageHub: 
 ``` 

 susetest:~ # suseconnect -p PackageHub/15.6/x86_64 
 Registering system to registration proxy http://all-67.1.proxy.scc.suse.de 

 Updating system details on http://all-67.1.proxy.scc.suse.de ... 

 Activating PackageHub 15.6 x86_64 ... 
 -> Adding service to system ... 
 -> Installing release package ... 

 Successfully registered system 

 ``` 
 And the repo will point to the wrong place: 
 ``` 
 18 | SUSE_Package_Hub_15_SP6_x86_64:SLE-Module-Packagehub-Subpackages15-SP6-Pool                       | SLE-Module-Packagehub-Subpackages15-SP6-Pool                | Yes       | (r ) Yes    | No        | http://openqa.suse.de/assets/repo/SLE-15-SP6-Module-Packagehub-Subpackages-POOL-x86_64-Build67.1-Media1/ 
 ``` 

 ## Solution  
 To cope with this, we would need to sync the PackageHub module for EVERY build we have for 15-SP6. Another solution would be to tweak ProxySCC code to return the real URL instead of local assets. 

 BUT there is an easier way: 
 1) Register the system using the usual proxySCC 
 ``` 
 susetest:~ # SUSEConnect -r $REGCODE --url http://all-67.1.proxy.scc.suse.de 
 Registering system to registration proxy http://all-67.1.proxy.scc.suse.de 

 Announcing system to http://all-67.1.proxy.scc.suse.de ... 

 Activating SLES 15.6 x86_64 ... 
 -> Adding service to system ... 

 Activating sle-module-basesystem 15.6 x86_64 ... 
 -> Adding service to system ... 
 -> Installing release package ... 

 Activating sle-module-server-applications 15.6 x86_64 ... 
 -> Adding service to system ... 
 -> Installing release package ... 

 Activating sle-module-python3 15.6 x86_64 ... 
 -> Adding service to system ... 
 -> Installing release package ... 

 Successfully registered system 
 ``` 

 2) Activate the desired module using `--url` pointing to real SCC: 
 ``` 
 susetest:~ # SUSEConnect -p PackageHub/15.6/x86_64 --url https://scc.suse.com 
 Registering system to SUSE Customer Center 

 Updating system details on https://scc.suse.com ... 

 Activating PackageHub 15.6 x86_64 ... 
 -> Adding service to system ... 
 -> Installing release package ... 

 Successfully registered system 
 ``` 

 3) And voilá, you will get the repos from REAL SCC: 
 ``` 
 susetest:~ # zypper lr -u |grep -i PackageHub-15-SP6-Pool 
 22 | SUSE_Package_Hub_15_SP6_x86_64:SUSE-PackageHub-15-SP6-Pool                                        | SUSE-PackageHub-15-SP6-Pool                                 | Yes       | (r ) Yes    | No        | https://updates.suse.com/SUSE/Backports/SLE-15-SP6_x86_64/product?RMMzfgZAuv8Hy903n30FsW6hbWs5KExVGGIwF1w5nRMdkliFvRBscHmgomWpHwFbG8l2C7cmrcZead-ejTo_f0NKbts7ZNwGBw0WtMwuWeKXxK2mgknqmbcYZ22y3RB3rThU1AMZTw 
 ```

Back