Cobbler's preseed.erb includes random repositories

Bug #1333082 reported by Ian Wells
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cisco Openstack
Triaged
Medium
Unassigned

Bug Description

in-target echo "Adding Cisco repo..."; if [ ! -d /etc/apt/sources.list.d ] ; then mkdir -p /target/etc/apt/sources.list.d;fi; echo "deb <%= @openstack_repo_location %> <%= @openstack_release %><%= @pocket %> main" > /target/etc/apt/sources.list.d/cisco-openstack-mirror_havana.list; \

.. I'm using the Icehouse installer, so the havana mirror is not wanted, and I'm using the default Ubuntu repo, so nor is the Cisco repository. I believe the whole of this line and a chunk of backing code should just go away.

Revision history for this message
Chris Ricker (chris-ricker) wrote :

I think maybe you checked out the wrong branch. I don't see that in our icehouse code tree:

CHRICKER-M-21AA:tmp chricker$ git clone -b icehouse https://github.com/CiscoSystems/puppet_openstack_builder
Cloning into 'puppet_openstack_builder'...
remote: Counting objects: 5005, done.
remote: Compressing objects: 100% (1969/1969), done.
remote: Total 5005 (delta 2873), reused 5005 (delta 2873)
Receiving objects: 100% (5005/5005), 1.08 MiB | 165.00 KiB/s, done.
Resolving deltas: 100% (2873/2873), done.
Checking connectivity... done.
CHRICKER-M-21AA:tmp chricker$ grep -r cisco-openstack-mirror_havana puppet_openstack_builder/
CHRICKER-M-21AA:tmp chricker$

also note that even with Ubuntu repos on icehouse you still need a Cisco repo to get the puppet modules and some of the puppet-related binaries that Canonical does not ship

Changed in openstack-cisco:
status: New → Incomplete
Revision history for this message
Chris Ricker (chris-ricker) wrote :

and I'm officially an idiot and missed that this was in puppet_cobbler not puppet_openstack_builder

Revision history for this message
Mark T. Voelker (mvoelker) wrote :

I believe this is the code block Ian is referring to:

https://github.com/CiscoSystems/puppet-cobbler/blob/i.0/templates/preseed.erb#L108-L109

Notice that it's not actually setting up a Havana repo because the location, pocket, and release are all parameterized:

echo "deb <%= @openstack_repo_location %> <%= @openstack_release %><%= @pocket %>"
[etc etc]

What is wrong is that the file name doesn't match what the actual release is...e.g. it's putting the Icehouse repository info into a file called "cisco-openstack-mirror_havana.list". That means you still get the right code, the file's just confusingly named. So, a couple of things need doing here:

1.) The file name should based on the release name, obviously. Or at least it needs to be statically corrected for the Icehouse train.
2.) If using upstream repos, ensure it doesn't get created at all.
3.) Remove the supplemental repo entirely. We don't need it in Icehouse at all.

Also for what it's worth: on AIO installs you actually end up with the files named properly and no supplemental repo already, and I think that's also the case if you don't boot baremetal with Cobbler (e.g. you install Ubuntu yourself via whatever means and then use the shim scripts or just manually point a puppet agent at the build node). It's only if you use Cobbler to boot baremetal that this manifests.

root@aio01:/etc/apt/sources.list.d# ls
cisco-openstack-mirror_icehouse.list
cisco-openstack-puppet-mirror_icehouse.list
root@aio01:/etc/apt/sources.list.d# cat cisco-openstack-mirror_icehouse.list
# cisco-openstack-mirror_icehouse
deb http://openstack-repo.cisco.com/openstack/cisco icehouse/snapshots/i.0 main
deb-src http://openstack-repo.cisco.com/openstack/cisco icehouse/snapshots/i.0 main
root@aio01:/etc/apt/sources.list.d# cat cisco-openstack-puppet-mirror_icehouse.list
# cisco-openstack-puppet-mirror_icehouse
deb http://openstack-repo.cisco.com/openstack/puppet icehouse/snapshots/i.0 main
deb-src http://openstack-repo.cisco.com/openstack/puppet icehouse/snapshots/i.0 main
root@aio01:/etc/apt/sources.list.d#

Changed in openstack-cisco:
status: Incomplete → Triaged
importance: Undecided → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.