I also meet the bug and fixed it.
before you import iso or CD
you modify
/usr/lib/python2.6/site-packages/cobbler/modules/manage_import_signatures.py
for distro in distros_added:
if distro.kernel.find("ks_mirror") != -1:
repo_adder(distro)
self.distros.add(distro, save=True)
else:
self.logger.info("skipping distro %s since it isn't
mirrored locally" % distro.name)
add a line :
self.distros.add(distro, save=True)
check the link
https://github.com/cobbler/cobbler/commit/ee10bc84032c8377d86b431c45899fddd14c8d7f
then restart cobbler and work well.
On Fri, Sep 20, 2013 at 9:01 PM, James Cammarata <[email protected]> wrote:
> You can download the distro ISOs, but the update/security repos must be
> done through RHN (which cobbler can point to).
>
>
> On Fri, Sep 20, 2013 at 12:14 AM, T Dickinson <
> [email protected]> wrote:
>
>> Thanks,
>>
>> Thats a great help.
>>
>> I've just had a quick look at our Prod environment (servers there use
>> RHEL5) and the RHEL doesn't appear to follow same yum convention
>> RHEL-Base.repo!
>> I'm guessing its due to RHN registration requirement. Is there a way to
>> mirror the RHEL distro/repos?
>>
>> Again, thanks for your help.
>>
>>
>> On 20/09/2013, at 2:49 PM, James Cammarata <[email protected]> wrote:
>>
>> Yes, the centos installer will put its own .repo files in yum.repos.d. I
>> typically write a snippet to remove those (pretty easy, just remove
>> /etc/yum.repos.d/CentOS*.repo).
>>
>>
>> On Thu, Sep 19, 2013 at 11:32 PM, T Dickinson <
>> [email protected]> wrote:
>>
>>> Thanks for the insight, I've added some detail below as I imagine my use
>>> case is very typical. Any help appreciated.
>>>
>>> I've used the import for the distro
>>>
>>> cobbler import --name=CentOS-59 --arch=x86_64 --path=/mnt/dvd1
>>>
>>> and as you suggested already contains ks_meta tree key/value
>>> information.
>>> I've also created a custom kickstart template based on the sample.ks (on
>>> slight additions) so it includes $yum_repo_stanza and $yum_config_stanza.
>>>
>>> I think I've been missing the point and expecting more from the import!
>>> Our servers will not have any visibility to the internet hence all yum
>>> request should come back to cobbler.
>>> Cobbler is used to build a very basic system, and then in the profile
>>> post $SNIPPET('kickstart_done') we load a shell script to run custom yum
>>> installs (of which all packages e.g. https can be found on the distro's
>>> [base]).
>>>
>>> I mis-understood the 'yum_post_install_mirror', it only effects mirrored
>>> Repos and not the imported Distros?
>>>
>>> So, Cobbler at no point is configured to modify the distro files
>>> populated into /etc/yum.repos.d/, i.e. no parsing of the
>>> standard CentOS-Base.repo file occurs?
>>>
>>> This is part of the CentOS-Base.repo file as it is….
>>>
>>> [base]
>>> name=CentOS-$releasever - Base
>>> mirrorlist=
>>> http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
>>> #baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
>>> gpgcheck=1
>>> gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
>>>
>>>
>>> I was expecting/hoping for something like this, is this correct/can it
>>> be achieved easily?
>>>
>>> [base]
>>> name=CentOS-$releasever - Base
>>> baseurl=http://myserver/cblr/links/CentOS-59-x86_64/
>>> gpgcheck=1
>>> gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6
>>>
>>>
>>>
>>>
>>> ==============================
>>>
>>>
>>> Here's the output from my setup.
>>>
>>> cat /var/lib/cobbler/config/distros.d/CentOS-59-x86_64.json | python
>>> -mjson.tool
>>> {
>>> "arch": "x86_64",
>>> "boot_files": {},
>>> "breed": "redhat",
>>> "comment": "",
>>> "ctime": 1379326634.6427431,
>>> "depth": 0,
>>> "fetchable_files": {},
>>> "initrd":
>>> "/var/www/cobbler/ks_mirror/CentOS-59-x86_64/images/pxeboot/initrd.img",
>>> "kernel":
>>> "/var/www/cobbler/ks_mirror/CentOS-59-x86_64/images/pxeboot/vmlinuz",
>>> "kernel_options": {},
>>> "kernel_options_post": {},
>>> "ks_meta": {
>>> "tree": "http://@@http_server@@/cblr/links/CentOS-59-x86_64"
>>> },
>>> "mgmt_classes": [],
>>> "mtime": 1379326634.6427431,
>>> "name": "CentOS-59-x86_64",
>>> "os_version": "rhel5",
>>> "owners": [
>>> "admin"
>>> ],
>>> "redhat_management_key": "<<inherit>>",
>>> "redhat_management_server": "<<inherit>>",
>>> "source_repos": [],
>>> "template_files": {},
>>> "tree_build_time": 0,
>>> "uid": "MTM3OTMyNjYzNC42NDI5NTUxNTEuNTEwNjI"
>>> }
>>>
>>>
>>> [root@cobbler-repo cobbler]# cat
>>> /var/lib/cobbler/config/profiles.d/CentOS-59_base.json | python -mjson.tool
>>> {
>>> "boot_files": {},
>>> "comment": "",
>>> "ctime": 1379391175.9183309,
>>> "depth": 1,
>>> "dhcp_tag": "default",
>>> "distro": "CentOS-59-x86_64",
>>> "enable_gpxe": 0,
>>> "enable_menu": 1,
>>> "fetchable_files": {},
>>> "kernel_options": {},
>>> "kernel_options_post": {},
>>> "kickstart": "/var/lib/cobbler/kickstarts/bg-centos5-core.ks",
>>> "ks_meta": {},
>>> "mgmt_classes": [],
>>> "mgmt_parameters": "<<inherit>>",
>>> "mtime": 1379633112.0474119,
>>> "name": "CentOS-59_base",
>>> "name_servers": [
>>> "10.20.1.25"
>>> ],
>>> "name_servers_search": [],
>>> "owners": [
>>> "admin"
>>> ],
>>> "parent": "",
>>> "proxy": "http://10.20.1.231:8123",
>>> "redhat_management_key": "<<inherit>>",
>>> "redhat_management_server": "<<inherit>>",
>>> "repos": [],
>>> "server": "<<inherit>>",
>>> "template_files": {},
>>> "template_remote_kickstarts": 0,
>>> "uid": "MTM3OTM5MTE3NS45MjczNjQzNjEuNDE3NTc",
>>> "virt_auto_boot": 1,
>>> "virt_bridge": "xenbr0",
>>> "virt_cpus": 1,
>>> "virt_disk_driver": "raw",
>>> "virt_file_size": 5,
>>> "virt_path": "",
>>> "virt_ram": 512,
>>> "virt_type": "vmware"
>>> }
>>>
>>>
>>>
>>>
>>>
>>>
>>> On 20/09/2013, at 1:26 PM, James Cammarata <[email protected]> wrote:
>>>
>>> By default, when you've run import on a distro, the cobbler server is
>>> configured as the default source in the kickstart assuming you have the
>>> $yum_repo_stanza and $yum_config_stanza variables in your kickstart (refer
>>> to the sample_end.ks we package to see where they go). Typically you will
>>> not setup a repo for the base distro, but you will usually setup repos for
>>> updates/security/EPEL etc.
>>>
>>> If you added the distro manual with "distro add", you'll need to add the
>>> tree variable to the distros ksmeta:
>>>
>>> $ cobbler distro edit --name=<your distro name> --in-place
>>> --ksmeta="tree=http://@@http_server@@/cblr/links/<dir>"
>>>
>>> Where <dir> is the directory (symlink) in /var/www/cobbler/links/ that
>>> points at your distro.
>>>
>>>
>>> On Thu, Sep 19, 2013 at 10:11 PM, T Dickinson <
>>> [email protected]> wrote:
>>>
>>>>
>>>> I would like my RHEL/CentOS installed servers (provisioned via cobbler)
>>>> to refer back to the cobbler server for all yum updates/installs.
>>>> I understand that is easy for mirrored repos, but how do I configure
>>>> cobbler so that the distro is used (after the kickstart is over) ?
>>>>
>>>>
>>>> Im using 2.4 should my installed server's yum repos point at the
>>>> cobbler server for the base repos? I'm using CentOS-5.9 and
>>>> /etc/yum.repos.d/CentOS-Base.repo does not point to my server hence any
>>>> post install yum calls go to internet. Should I create a Repo for the
>>>> Distro I've installed… this post hints at my dilema
>>>> http://www.redhat.com/archives/et-mgmt-tools/2007-September/msg00128.html
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> cobbler mailing list
>>>> [email protected]
>>>> https://lists.fedorahosted.org/mailman/listinfo/cobbler
>>>>
>>>>
>>> _______________________________________________
>>> cobbler mailing list
>>> [email protected]
>>> https://lists.fedorahosted.org/mailman/listinfo/cobbler
>>>
>>>
>>> _______________________________________________
>>> cobbler mailing list
>>> [email protected]
>>> https://lists.fedorahosted.org/mailman/listinfo/cobbler
>>>
>>>
>> _______________________________________________
>> cobbler mailing list
>> [email protected]
>> https://lists.fedorahosted.org/mailman/listinfo/cobbler
>>
>>
>> _______________________________________________
>> cobbler mailing list
>> [email protected]
>> https://lists.fedorahosted.org/mailman/listinfo/cobbler
>>
>>
>
> _______________________________________________
> cobbler mailing list
> [email protected]
> https://lists.fedorahosted.org/mailman/listinfo/cobbler
>
>
--
Shake Chen
_______________________________________________
cobbler mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/cobbler