I've taken the rather extreme option of deleting the "CentOS-*.repo" files 
from /etc/yum.repos.d/ at the start of the %post section.  Bit harsh, but 
it proved the theory was sound.  I can now perform successful builds with 
no external access.

This can't be the 'right' way to do it though.  Is this the way the 
subscription_manager_registration snippet is supposed to work?

On Wednesday, 1 March 2017 12:10:15 UTC, Duncan Innes wrote:
>
> Do you do that during kickstart or once booted?  I think at the point of 
> trying to install subscription-manager, my hosts only have the external 
> repos configured, so there's no way to satisfy the install internally.
>
> I've edited the Katello Kickstart Default template to include 
> subscription-manager in the initial %packages list.  This means it's 
> already there when the subscription_manager_registration snippet is run. 
>  But the yum commands still fail if I remove internet access as I've not 
> "enabled=0" to all the external repos at this point.
>
> Shouldn't the subscription_manager_registration snippet be capable of 
> installing subscription-manager without internet access?
>
> D
>
> On Wednesday, 1 March 2017 11:00:46 UTC, Lachlan Musicman wrote:
>>
>> I don't know if there's an automagic way to do it, but I use ansible to 
>> change all files in /etc/yum.repos.d/ except "redhat.repo". In each file 
>> change any enabled =1 to enabled = 0.
>>
>> cheers
>> L.
>>
>> ------
>> The most dangerous phrase in the language is, "We've always done it this 
>> way."
>>
>> - Grace Hopper
>>
>> On 1 March 2017 at 21:55, Duncan Innes <dun...@innes.net> wrote:
>>
>>> Hi,
>>>
>>> I've built a new Katello 3.3 system and loaded it up with CentOS 7, 
>>> EPEL, and Katello Client 3.3 channels.  The various repositories have been 
>>> synched (although lazy sync). Content View, Activation Key etc created.
>>>
>>> When I build a new system, however, the installation of 
>>> subscription-manager appears to be heading out to the internet rather than 
>>> finding the relevant packages from the Katello server.  The top of my 
>>> install.post.log reads:
>>>
>>> updating system time
>>> Loaded plugins: fastestmirror
>>> Determining fastest mirrors
>>>  * base: *mirror.sax.uk.as61049.net <http://mirror.sax.uk.as61049.net>*
>>>  * extras: *mirror.bytemark.co.uk <http://mirror.bytemark.co.uk>*
>>>  * updates: *mirrors.coreix.net <http://mirrors.coreix.net>*
>>> Resolving Dependencies
>>> --> Running transaction check
>>> ---> Package subscription-manager.x86_64 0:1.17.15-1.el7.centos will be 
>>> installed
>>> --> Processing Dependency: python-rhsm >= 1.17.0 for package: 
>>> subscription-manager-1.17.15-1.el7.centos.x86_64
>>> --> Processing Dependency: usermode for package: 
>>> subscription-manager-1.17.15-1.el7.centos.x86_64
>>> --> Processing Dependency: python-ethtool for package: 
>>> subscription-manager-1.17.15-1.el7.centos.x86_64
>>> --> Processing Dependency: python-dmidecode for package: 
>>> subscription-manager-1.17.15-1.el7.centos.x86_64
>>> --> Processing Dependency: python-dateutil for package: 
>>> subscription-manager-1.17.15-1.el7.centos.x86_64
>>> --> Running transaction check
>>> ---> Package python-dateutil.noarch 0:1.5-7.el7 will be installed
>>> ---> Package python-dmidecode.x86_64 0:3.10.13-11.el7 will be installed
>>> --> Processing Dependency: libxml2-python for package: 
>>> python-dmidecode-3.10.13-11.el7.x86_64
>>> --> Processing Dependency: libxml2mod.so()(64bit) for package: 
>>> python-dmidecode-3.10.13-11.el7.x86_64
>>> ---> Package python-ethtool.x86_64 0:0.8-5.el7 will be installed
>>> --> Processing Dependency: libnl.so.1()(64bit) for package: 
>>> python-ethtool-0.8-5.el7.x86_64
>>> ---> Package python-rhsm.x86_64 0:1.17.9-1.el7 will be installed
>>> --> Processing Dependency: python-rhsm-certificates = 1.17.9-1.el7 for 
>>> package: python-rhsm-1.17.9-1.el7.x86_64
>>> --> Processing Dependency: m2crypto for package: 
>>> python-rhsm-1.17.9-1.el7.x86_64
>>> ---> Package usermode.x86_64 0:1.111-5.el7 will be installed
>>> --> Running transaction check
>>> ---> Package libnl.x86_64 0:1.1.4-3.el7 will be installed
>>> ---> Package libxml2-python.x86_64 0:2.9.1-6.el7_2.3 will be installed
>>> ---> Package m2crypto.x86_64 0:0.21.1-17.el7 will be installed
>>> ---> Package python-rhsm-certificates.x86_64 0:1.17.9-1.el7 will be 
>>> installed
>>> --> Finished Dependency Resolution
>>>
>>> Dependencies Resolved
>>>
>>>
>>> ================================================================================
>>>  Package                     Arch      Version                   
>>>  Repository
>>>                                                                         
>>>    Size
>>>
>>> ================================================================================
>>> Installing:
>>>  subscription-manager        x86_64    1.17.15-1.el7.centos       base   
>>>  883 k
>>> Installing for dependencies:
>>>  libnl                       x86_64    1.1.4-3.el7                base   
>>>  128 k
>>>  libxml2-python              x86_64    2.9.1-6.el7_2.3            base   
>>>  247 k
>>>  m2crypto                    x86_64    0.21.1-17.el7              base   
>>>  429 k
>>>  python-dateutil             noarch    1.5-7.el7                  base   
>>>   85 k
>>>  python-dmidecode            x86_64    3.10.13-11.el7             base   
>>>   82 k
>>>  python-ethtool              x86_64    0.8-5.el7                  base   
>>>   33 k
>>>  python-rhsm                 x86_64    1.17.9-1.el7               base   
>>>  116 k
>>>  python-rhsm-certificates    x86_64    1.17.9-1.el7               base   
>>>   38 k
>>>  usermode                    x86_64    1.111-5.el7                base   
>>>  193 k
>>>
>>> Transaction Summary
>>>
>>> ================================================================================
>>> Install  1 Package (+9 Dependent packages)
>>>
>>> Total download size: 2.2 M
>>> Installed size: 9.2 M
>>> Downloading packages:
>>> warning: 
>>> /var/cache/yum/x86_64/7/base/packages/python-dmidecode-3.10.13-11.el7.x86_64.rpm:
>>>  
>>> Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY
>>> Public key for python-dmidecode-3.10.13-11.el7.x86_64.rpm is not 
>>> installed
>>>
>>> --------------------------------------------------------------------------------
>>> Total                                              933 kB/s | 2.2 MB 
>>>  00:02     
>>> Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
>>> Importing GPG key 0xF4A80EB5:
>>>  Userid     : "CentOS-7 Key (CentOS 7 Official Signing Key) <
>>> secu...@centos.org>"
>>>  Fingerprint: 6341 ab27 53d7 8a78 a7c2 7bb1 24c6 a8a7 f4a8 0eb5
>>>  Package    : centos-release-7-3.1611.el7.centos.x86_64 (@anaconda)
>>>  From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
>>> Running transaction check
>>> Running transaction test
>>> Transaction test succeeded
>>> Running transaction
>>>   Installing : python-dateutil-1.5-7.el7.noarch                         
>>>    1/10 
>>>   Installing : usermode-1.111-5.el7.x86_64                               
>>>   2/10 
>>>   Installing : libnl-1.1.4-3.el7.x86_64                                 
>>>    3/10 
>>>   Installing : python-ethtool-0.8-5.el7.x86_64                           
>>>   4/10 
>>>   Installing : libxml2-python-2.9.1-6.el7_2.3.x86_64                     
>>>   5/10 
>>>   Installing : python-dmidecode-3.10.13-11.el7.x86_64                   
>>>    6/10 
>>>   Installing : python-rhsm-certificates-1.17.9-1.el7.x86_64             
>>>    7/10 
>>>   Installing : m2crypto-0.21.1-17.el7.x86_64                             
>>>   8/10 
>>>   Installing : python-rhsm-1.17.9-1.el7.x86_64                           
>>>   9/10 
>>>   Installing : subscription-manager-1.17.15-1.el7.centos.x86_64         
>>>   10/10 
>>>   Verifying  : m2crypto-0.21.1-17.el7.x86_64                             
>>>   1/10 
>>>   Verifying  : python-rhsm-certificates-1.17.9-1.el7.x86_64             
>>>    2/10 
>>>   Verifying  : python-dmidecode-3.10.13-11.el7.x86_64                   
>>>    3/10 
>>>   Verifying  : python-rhsm-1.17.9-1.el7.x86_64                           
>>>   4/10 
>>>   Verifying  : python-dateutil-1.5-7.el7.noarch                         
>>>    5/10 
>>>   Verifying  : libxml2-python-2.9.1-6.el7_2.3.x86_64                     
>>>   6/10 
>>>   Verifying  : python-ethtool-0.8-5.el7.x86_64                           
>>>   7/10 
>>>   Verifying  : libnl-1.1.4-3.el7.x86_64                                 
>>>    8/10 
>>>   Verifying  : subscription-manager-1.17.15-1.el7.centos.x86_64         
>>>    9/10 
>>>   Verifying  : usermode-1.111-5.el7.x86_64                               
>>>  10/10 
>>>
>>> Installed:
>>>   subscription-manager.x86_64 0:1.17.15-1.el7.centos                     
>>>        
>>>
>>> Dependency Installed:
>>>   libnl.x86_64 0:1.1.4-3.el7                                             
>>>        
>>>   libxml2-python.x86_64 0:2.9.1-6.el7_2.3                               
>>>         
>>>   m2crypto.x86_64 0:0.21.1-17.el7                                       
>>>         
>>>   python-dateutil.noarch 0:1.5-7.el7                                     
>>>        
>>>   python-dmidecode.x86_64 0:3.10.13-11.el7                               
>>>        
>>>   python-ethtool.x86_64 0:0.8-5.el7                                     
>>>         
>>>   python-rhsm.x86_64 0:1.17.9-1.el7                                     
>>>         
>>>   python-rhsm-certificates.x86_64 0:1.17.9-1.el7                         
>>>        
>>>   usermode.x86_64 0:1.111-5.el7                                         
>>>         
>>>
>>> Complete!
>>> Retrieving 
>>> http://katello.innes.net/pub/katello-ca-consumer-latest.noarch.rpm
>>> Preparing...                         
>>>  ########################################
>>> Updating / installing...
>>>
>>> katello-ca-consumer-katello.innes.net-########################################
>>> Registering the System
>>> The system has been registered with ID: 
>>> 87b77c29-f145-432f-a550-abf190aee982 
>>>
>>> No products installed.
>>> Installing Katello Agent
>>> Loaded plugins: fastestmirror, product-id, search-disabled-repos, 
>>> subscription-
>>>               : manager
>>> Loading mirror speeds from cached hostfile
>>>  * base: mirror.sax.uk.as61049.net
>>>  * extras: mirror.bytemark.co.uk
>>>  * updates: mirrors.coreix.net
>>> Resolving Dependencies
>>> --> Running transaction check
>>> ---> Package katello-agent.noarch 0:2.9.1-1.el7 will be installed
>>> --> Processing Dependency: python2-tracer >= 0.6.12 for package: 
>>> katello-agent-2.9.1-1.el7.noarch
>>> --> Processing Dependency: python-pulp-agent-lib >= 2.6 for package: 
>>> katello-agent-2.9.1-1.el7.noarch
>>> --> Processing Dependency: python-gofer-proton >= 2.5 for package: 
>>> katello-agent-2.9.1-1.el7.noarch
>>> --> Processing Dependency: pulp-rpm-handlers >= 2.6 for package: 
>>> katello-agent-2.9.1-1.el7.noarch
>>> --> Processing Dependency: gofer >= 2.7.6 for package: 
>>> katello-agent-2.9.1-1.el7.noarch
>>> --> Processing Dependency: katello-agent-fact-plugin for package: 
>>> katello-agent-2.9.1-1.el7.noarch
>>> --> Running transaction check
>>> ---> Package gofer.noarch 0:2.7.6-1.el7 will be installed
>>> --> Processing Dependency: python-gofer = 2.7.6 for package: 
>>> gofer-2.7.6-1.el7.noarch
>>> ---> Package katello-agent-fact-plugin.noarch 0:2.9.1-1.el7 will be 
>>> installed
>>> ---> Package pulp-rpm-handlers.noarch 0:2.10.3-1.el7 will be installed
>>> --> Processing Dependency: python-pulp-rpm-common = 2.10.3 for package: 
>>> pulp-rpm-handlers-2.10.3-1.el7.noarch
>>> ---> Package python-gofer-proton.noarch 0:2.7.6-1.el7 will be installed
>>> --> Processing Dependency: python-qpid-proton >= 0.9-5 for package: 
>>> python-gofer-proton-2.7.6-1.el7.noarch
>>> ---> Package python-pulp-agent-lib.noarch 0:2.10.3-1.el7 will be 
>>> installed
>>> --> Processing Dependency: python-pulp-common = 2.10.3 for package: 
>>> python-pulp-agent-lib-2.10.3-1.el7.noarch
>>> ---> Package python2-tracer.noarch 0:0.6.12-4.el7 will be installed
>>> --> Processing Dependency: tracer-common = 0.6.12-4.el7 for package: 
>>> python2-tracer-0.6.12-4.el7.noarch
>>> --> Processing Dependency: python-psutil for package: 
>>> python2-tracer-0.6.12-4.el7.noarch
>>> --> Processing Dependency: python-lxml for package: 
>>> python2-tracer-0.6.12-4.el7.noarch
>>> --> Processing Dependency: python-beautifulsoup4 for package: 
>>> python2-tracer-0.6.12-4.el7.noarch
>>> --> Running transaction check
>>> ---> Package python-beautifulsoup4.noarch 0:4.3.2-1.el7 will be installed
>>> --> Processing Dependency: python-html5lib for package: 
>>> python-beautifulsoup4-4.3.2-1.el7.noarch
>>> ---> Package python-gofer.noarch 0:2.7.6-1.el7 will be installed
>>> ---> Package python-lxml.x86_64 0:3.2.1-4.el7 will be installed
>>> --> Processing Dependency: libxslt.so.1(LIBXML2_1.1.9)(64bit) for 
>>> package: python-lxml-3.2.1-4.el7.x86_64
>>> --> Processing Dependency: libxslt.so.1(LIBXML2_1.1.26)(64bit) for 
>>> package: python-lxml-3.2.1-4.el7.x86_64
>>> --> Processing Dependency: libxslt.so.1(LIBXML2_1.1.2)(64bit) for 
>>> package: python-lxml-3.2.1-4.el7.x86_64
>>> --> Processing Dependency: libxslt.so.1(LIBXML2_1.0.24)(64bit) for 
>>> package: python-lxml-3.2.1-4.el7.x86_64
>>> --> Processing Dependency: libxslt.so.1(LIBXML2_1.0.22)(64bit) for 
>>> package: python-lxml-3.2.1-4.el7.x86_64
>>> --> Processing Dependency: libxslt.so.1(LIBXML2_1.0.18)(64bit) for 
>>> package: python-lxml-3.2.1-4.el7.x86_64
>>> --> Processing Dependency: libxslt.so.1(LIBXML2_1.0.11)(64bit) for 
>>> package: python-lxml-3.2.1-4.el7.x86_64
>>> --> Processing Dependency: libxslt.so.1()(64bit) for package: 
>>> python-lxml-3.2.1-4.el7.x86_64
>>> --> Processing Dependency: libexslt.so.0()(64bit) for package: 
>>> python-lxml-3.2.1-4.el7.x86_64
>>> ---> Package python-psutil.x86_64 0:2.2.1-1.el7 will be installed
>>> ---> Package python-pulp-common.noarch 0:2.10.3-1.el7 will be installed
>>> --> Processing Dependency: python-isodate >= 0.5.0-1.pulp for package: 
>>> python-pulp-common-2.10.3-1.el7.noarch
>>> ---> Package python-pulp-rpm-common.noarch 0:2.10.3-1.el7 will be 
>>> installed
>>> ---> Package python-qpid-proton.x86_64 0:0.14.0-2.el7 will be installed
>>> --> Processing Dependency: qpid-proton-c(x86-64) = 0.14.0-2.el7 for 
>>> package: python-qpid-proton-0.14.0-2.el7.x86_64
>>> --> Processing Dependency: libqpid-proton.so.8()(64bit) for package: 
>>> python-qpid-proton-0.14.0-2.el7.x86_64
>>> ---> Package tracer-common.noarch 0:0.6.12-4.el7 will be installed
>>> --> Running transaction check
>>> ---> Package libxslt.x86_64 0:1.1.28-5.el7 will be installed
>>> ---> Package python-html5lib.noarch 1:0.999-5.el7 will be installed
>>> --> Processing Dependency: python-six for package: 
>>> 1:python-html5lib-0.999-5.el7.noarch
>>> ---> Package python-isodate.noarch 0:0.5.0-4.pulp.el7 will be installed
>>> ---> Package qpid-proton-c.x86_64 0:0.14.0-2.el7 will be installed
>>> --> Running transaction check
>>> ---> Package python-six.noarch 0:1.9.0-2.el7 will be installed
>>> --> Finished Dependency Resolution
>>>
>>> Dependencies Resolved
>>>
>>>
>>> ================================================================================
>>>  Package            Arch   Version       Repository                     
>>>    Size
>>>
>>> ================================================================================
>>> Installing:
>>>  katello-agent      noarch 2.9.1-1.el7   
>>> Innes_Katello_Katello_Client_3_3  30 k
>>> Installing for dependencies:
>>>  gofer              noarch 2.7.6-1.el7   
>>> Innes_Katello_Katello_Client_3_3  84 k
>>>  katello-agent-fact-plugin
>>>                     noarch 2.9.1-1.el7   
>>> Innes_Katello_Katello_Client_3_3  11 k
>>>  libxslt            x86_64 1.1.28-5.el7  Innes_CentOS_CentOS_7_Base     
>>>   242 k
>>>  pulp-rpm-handlers  noarch 2.10.3-1.el7 
>>>  Innes_Katello_Katello_Client_3_3  73 k
>>>  python-beautifulsoup4
>>>                     noarch 4.3.2-1.el7   Innes_EPEL_EPEL_7               
>>>  149 k
>>>  python-gofer       noarch 2.7.6-1.el7   
>>> Innes_Katello_Katello_Client_3_3 132 k
>>>  python-gofer-proton
>>>                     noarch 2.7.6-1.el7   
>>> Innes_Katello_Katello_Client_3_3  53 k
>>>  python-html5lib    noarch 1:0.999-5.el7 Innes_EPEL_EPEL_7               
>>>  206 k
>>>  python-isodate     noarch 0.5.0-4.pulp.el7
>>>                                         
>>>  Innes_Katello_Katello_Client_3_3  50 k
>>>  python-lxml        x86_64 3.2.1-4.el7   Innes_CentOS_CentOS_7_Base     
>>>   758 k
>>>  python-psutil      x86_64 2.2.1-1.el7   Innes_EPEL_EPEL_7               
>>>  114 k
>>>  python-pulp-agent-lib
>>>                     noarch 2.10.3-1.el7 
>>>  Innes_Katello_Katello_Client_3_3  91 k
>>>  python-pulp-common noarch 2.10.3-1.el7 
>>>  Innes_Katello_Katello_Client_3_3 123 k
>>>  python-pulp-rpm-common
>>>                     noarch 2.10.3-1.el7 
>>>  Innes_Katello_Katello_Client_3_3  65 k
>>>  python-qpid-proton x86_64 0.14.0-2.el7  Innes_CentOS_CentOS_7_Extras   
>>>   212 k
>>>  python-six         noarch 1.9.0-2.el7   Innes_CentOS_CentOS_7_Base     
>>>    29 k
>>>  python2-tracer     noarch 0.6.12-4.el7  Innes_EPEL_EPEL_7               
>>>  101 k
>>>  qpid-proton-c      x86_64 0.14.0-2.el7  Innes_CentOS_CentOS_7_Extras   
>>>   130 k
>>>  tracer-common      noarch 0.6.12-4.el7  Innes_EPEL_EPEL_7               
>>>   25 k
>>>
>>> Transaction Summary
>>>
>>> ================================================================================
>>> Install  1 Package (+19 Dependent packages)
>>>
>>> Total download size: 2.6 M
>>> Installed size: 9.0 M
>>> Downloading packages:
>>>
>>> --------------------------------------------------------------------------------
>>> Total                                              1.9 MB/s | 2.6 MB 
>>>  00:01     
>>> Running transaction check
>>> Running transaction test
>>> Transaction test succeeded
>>> Running transaction
>>>   Installing : python-gofer-2.7.6-1.el7.noarch                           
>>>   1/20 
>>>   Installing : gofer-2.7.6-1.el7.noarch                                 
>>>    2/20 
>>>   Installing : qpid-proton-c-0.14.0-2.el7.x86_64                         
>>>   3/20 
>>>   Installing : python-qpid-proton-0.14.0-2.el7.x86_64                   
>>>    4/20 
>>>   Installing : python-gofer-proton-2.7.6-1.el7.noarch                   
>>>    5/20 
>>>   Installing : python-six-1.9.0-2.el7.noarch                             
>>>   6/20 
>>>   Installing : 1:python-html5lib-0.999-5.el7.noarch                     
>>>    7/20 
>>>   Installing : python-beautifulsoup4-4.3.2-1.el7.noarch                 
>>>    8/20 
>>>   Installing : python-isodate-0.5.0-4.pulp.el7.noarch                   
>>>    9/20 
>>>   Installing : python-pulp-common-2.10.3-1.el7.noarch                   
>>>   10/20 
>>>   Installing : python-pulp-agent-lib-2.10.3-1.el7.noarch                 
>>>  11/20 
>>>   Installing : python-pulp-rpm-common-2.10.3-1.el7.noarch               
>>>   12/20 
>>>   Installing : pulp-rpm-handlers-2.10.3-1.el7.noarch                     
>>>  13/20 
>>>   Installing : tracer-common-0.6.12-4.el7.noarch                         
>>>  14/20 
>>>   Installing : python-psutil-2.2.1-1.el7.x86_64                         
>>>   15/20 
>>>   Installing : katello-agent-fact-plugin-2.9.1-1.el7.noarch             
>>>   16/20 
>>>   Installing : libxslt-1.1.28-5.el7.x86_64                               
>>>  17/20 
>>>   Installing : python-lxml-3.2.1-4.el7.x86_64                           
>>>   18/20 
>>>   Installing : python2-tracer-0.6.12-4.el7.noarch                       
>>>   19/20 
>>>   Installing : katello-agent-2.9.1-1.el7.noarch                         
>>>   20/20 
>>> Note: Forwarding request to 'systemctl enable goferd.service'.
>>> Created symlink 
>>> /etc/systemd/system/multi-user.target.wants/goferd.service, pointing to 
>>> /usr/lib/systemd/system/goferd.service.
>>>   Verifying  : libxslt-1.1.28-5.el7.x86_64                               
>>>   1/20 
>>>   Verifying  : gofer-2.7.6-1.el7.noarch                                 
>>>    2/20 
>>>   Verifying  : katello-agent-2.9.1-1.el7.noarch                         
>>>    3/20 
>>>   Verifying  : python-qpid-proton-0.14.0-2.el7.x86_64                   
>>>    4/20 
>>>   Verifying  : python-gofer-proton-2.7.6-1.el7.noarch                   
>>>    5/20 
>>>   Verifying  : katello-agent-fact-plugin-2.9.1-1.el7.noarch             
>>>    6/20 
>>>   Verifying  : python-gofer-2.7.6-1.el7.noarch                           
>>>   7/20 
>>>   Verifying  : python-pulp-common-2.10.3-1.el7.noarch                   
>>>    8/20 
>>>   Verifying  : 1:python-html5lib-0.999-5.el7.noarch                     
>>>    9/20 
>>>   Verifying  : python-psutil-2.2.1-1.el7.x86_64                         
>>>   10/20 
>>>   Verifying  : python-lxml-3.2.1-4.el7.x86_64                           
>>>   11/20 
>>>   Verifying  : pulp-rpm-handlers-2.10.3-1.el7.noarch                     
>>>  12/20 
>>>   Verifying  : python-pulp-agent-lib-2.10.3-1.el7.noarch                 
>>>  13/20 
>>>   Verifying  : python-pulp-rpm-common-2.10.3-1.el7.noarch               
>>>   14/20 
>>>   Verifying  : python2-tracer-0.6.12-4.el7.noarch                       
>>>   15/20 
>>>   Verifying  : tracer-common-0.6.12-4.el7.noarch                         
>>>  16/20 
>>>   Verifying  : python-beautifulsoup4-4.3.2-1.el7.noarch                 
>>>   17/20 
>>>   Verifying  : python-isodate-0.5.0-4.pulp.el7.noarch                   
>>>   18/20 
>>>   Verifying  : python-six-1.9.0-2.el7.noarch                             
>>>  19/20 
>>>   Verifying  : qpid-proton-c-0.14.0-2.el7.x86_64                         
>>>  20/20 
>>>
>>> Installed:
>>>   katello-agent.noarch 0:2.9.1-1.el7                                     
>>>        
>>>
>>> Dependency Installed:
>>>   gofer.noarch 0:2.7.6-1.el7                                             
>>>        
>>>   katello-agent-fact-plugin.noarch 0:2.9.1-1.el7                         
>>>        
>>>   libxslt.x86_64 0:1.1.28-5.el7                                         
>>>         
>>>   pulp-rpm-handlers.noarch 0:2.10.3-1.el7                               
>>>         
>>>   python-beautifulsoup4.noarch 0:4.3.2-1.el7                             
>>>        
>>>   python-gofer.noarch 0:2.7.6-1.el7                                     
>>>         
>>>   python-gofer-proton.noarch 0:2.7.6-1.el7                               
>>>        
>>>   python-html5lib.noarch 1:0.999-5.el7                                   
>>>        
>>>   python-isodate.noarch 0:0.5.0-4.pulp.el7                               
>>>        
>>>   python-lxml.x86_64 0:3.2.1-4.el7                                       
>>>        
>>>   python-psutil.x86_64 0:2.2.1-1.el7                                     
>>>        
>>>   python-pulp-agent-lib.noarch 0:2.10.3-1.el7                           
>>>         
>>>   python-pulp-common.noarch 0:2.10.3-1.el7                               
>>>        
>>>   python-pulp-rpm-common.noarch 0:2.10.3-1.el7                           
>>>        
>>>   python-qpid-proton.x86_64 0:0.14.0-2.el7                               
>>>        
>>>   python-six.noarch 0:1.9.0-2.el7                                       
>>>         
>>>   python2-tracer.noarch 0:0.6.12-4.el7                                   
>>>        
>>>   qpid-proton-c.x86_64 0:0.14.0-2.el7                                   
>>>         
>>>   tracer-common.noarch 0:0.6.12-4.el7                                   
>>>         
>>>
>>> Complete!
>>>
>>> Which looks to me like subscription-manager is being sourced from 
>>> internet channels, but the katello-agent is then sourced from my 
>>> internal Katello channels.  Both the Katello server and the client are 
>>> libvirt guests on my laptop.  If I remove internet access from my laptop, 
>>> the top of my install.post.log reads:
>>>
>>> updating system time
>>> Error resolving 0.fedora.pool.ntp.org: Name or service not known (-2)
>>> Loaded plugins: fastestmirror
>>>
>>>
>>>  One of the configured repositories failed (Unknown),
>>>  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. Run the command with the repository temporarily disabled
>>>             yum --disablerepo=<repoid> ...
>>>
>>>      4. Disable the repository permanently, 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 <repoid>
>>>         or
>>>             subscription-manager repos --disable=<repoid>
>>>
>>>      5. 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=<repoid>.skip_if_unavailable=true
>>>
>>> Cannot find a valid baseurl for repo: base/7/x86_64
>>> Could not retrieve mirrorlist 
>>> http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=os&infra=stock 
>>> error was
>>> 14: curl#6 - "Could not resolve host: mirrorlist.centos.org; Unknown 
>>> error"
>>> error: Failed dependencies:
>>>         subscription-manager is needed by 
>>> katello-ca-consumer-katello.innes.net-1.0-1.noarch
>>> Retrieving 
>>> http://katello.innes.net/pub/katello-ca-consumer-latest.noarch.rpm
>>> Registering the System
>>> /tmp/ks-script-nnZRVE: line 48: subscription-manager: command not found
>>>
>>> How can I ensure that subscription-manager is sourced from Katello 
>>> rather than Internet sources?  I need to be able to demonstrate builds when 
>>> there is no external connection available.
>>>
>>> Cheers
>>>
>>> Duncan
>>>
>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Foreman users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to foreman-user...@googlegroups.com.
>>> To post to this group, send email to forema...@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/foreman-users.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to foreman-users+unsubscr...@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at https://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to