Quack,
(this is a post I made for centos@ on 2021-10-27 and that never made it on the list for some unknown reason; retrying here since it's still current)
I'm trying to install CentOS Stream directly without switching from Linux to Stream in our automated install. The changes were straightforward but I was very surprised to get CentOS Linux instead of the expected CentOS Stream.
I captured the virt-install call to check if there was any mistake and that's fine: virt-install -n taiste.osci.io --memory=2048,maxmemory=4096 --memballoon virtio --disk bus=virtio,path=/dev/vg_Spritz/taiste.osci.io --vcpus=1,maxvcpus=2 --initrd-inject=/etc/libvirt/kickstarts/taiste.osci.io/ks.cfg --autostart --noautoconsole --watchdog default --arch x86_64 -l http://mirror.rackspace.com/CentOS/8-stream/BaseOS/x86_64/os/ --network bridge=virbr0,model=virtio --graphics none -x 'net.ifnames=0 inst.ks=file:/ks.cfg ks=file:/ks.cfg console=tty0 console=ttyS0'
Our kickstart (ks.cfg) contains: url --mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&rep... and that has worked for ages.
Digging deeper I found out $releasever only contains the major version without the variant (like "6Server" on RHEL for eg).
DNF is using a new variable $stream that breaks compatibility with the past and AFAIK is only available through DNF (but I can't use it in the kickstart for all versions anyway).
Since we're using Ansible I can work around that but I was wondering if there was any way to handle this better in a retro-compatible way.
Regards. _o<
On 08/12/2021 10:00, Marc Dequènes (Duck) wrote:
Quack,
(this is a post I made for centos@ on 2021-10-27 and that never made it on the list for some unknown reason; retrying here since it's still current)
I'm trying to install CentOS Stream directly without switching from Linux to Stream in our automated install. The changes were straightforward but I was very surprised to get CentOS Linux instead of the expected CentOS Stream.
I captured the virt-install call to check if there was any mistake and that's fine: virt-install -n taiste.osci.io --memory=2048,maxmemory=4096 --memballoon virtio --disk bus=virtio,path=/dev/vg_Spritz/taiste.osci.io --vcpus=1,maxvcpus=2 --initrd-inject=/etc/libvirt/kickstarts/taiste.osci.io/ks.cfg --autostart --noautoconsole --watchdog default --arch x86_64 -l http://mirror.rackspace.com/CentOS/8-stream/BaseOS/x86_64/os/ --network bridge=virbr0,model=virtio --graphics none -x 'net.ifnames=0 inst.ks=file:/ks.cfg ks=file:/ks.cfg console=tty0 console=ttyS0'
Our kickstart (ks.cfg) contains: url --mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&rep...
and that has worked for ages.
Digging deeper I found out $releasever only contains the major version without the variant (like "6Server" on RHEL for eg).
DNF is using a new variable $stream that breaks compatibility with the past and AFAIK is only available through DNF (but I can't use it in the kickstart for all versions anyway).
Since we're using Ansible I can work around that but I was wondering if there was any way to handle this better in a retro-compatible way.
Regards. _o<
Well, I think it was already discussed multiple times on this list but yeah, $releasever is and will remain the corresponding version so 8-stream will answer 8 and 9-stream will answer 9. Stream uses another yum/dnf variable called "stream" :
See on a 8-stream :
cat /etc/yum/vars/stream 8-stream
grep mirrorlist /etc/yum.repos.d/CentOS-Stream-BaseOS.repo mirrorlist=http://mirrorlist.centos.org/?release=$stream&arch=$basearch&repo=Ba...
That's the reason why even for CentOS Infra we have a specific {{ centos_version }} declared in our ansible inventories that was 8 and now by default is 8-stream for the kickstart we use :
https://github.com/CentOS/ansible-infra-playbooks/blob/master/templates/kick...
Quack,
On 12/8/21 18:31, Fabian Arrotin wrote:
Well, I think it was already discussed multiple times on this list but yeah, $releasever is and will remain the corresponding version so 8-stream will answer 8 and 9-stream will answer 9. Stream uses another yum/dnf variable called "stream" :
Sorry, missed that.
That's the reason why even for CentOS Infra we have a specific {{ centos_version }} declared in our ansible inventories that was 8 and now by default is 8-stream for the kickstart we use :
That's what I did in our role too, but I was expecting it to be a workaround.
Well, hopefully this will all go away when we stop using non-stream.
Thanks. _o<
On Wed, Dec 8, 2021 at 4:00 AM Marc Dequènes (Duck) duck@redhat.com wrote:
Quack,
(this is a post I made for centos@ on 2021-10-27 and that never made it on the list for some unknown reason; retrying here since it's still current)
I'm trying to install CentOS Stream directly without switching from Linux to Stream in our automated install. The changes were straightforward but I was very surprised to get CentOS Linux instead of the expected CentOS Stream.
I captured the virt-install call to check if there was any mistake and that's fine: virt-install -n taiste.osci.io --memory=2048,maxmemory=4096 --memballoon virtio --disk bus=virtio,path=/dev/vg_Spritz/taiste.osci.io --vcpus=1,maxvcpus=2 --initrd-inject=/etc/libvirt/kickstarts/taiste.osci.io/ks.cfg --autostart --noautoconsole --watchdog default --arch x86_64 -l http://mirror.rackspace.com/CentOS/8-stream/BaseOS/x86_64/os/ --network bridge=virbr0,model=virtio --graphics none -x 'net.ifnames=0 inst.ks=file:/ks.cfg ks=file:/ks.cfg console=tty0 console=ttyS0'
Our kickstart (ks.cfg) contains: url --mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&rep... and that has worked for ages.
Digging deeper I found out $releasever only contains the major version without the variant (like "6Server" on RHEL for eg).
DNF is using a new variable $stream that breaks compatibility with the past and AFAIK is only available through DNF (but I can't use it in the kickstart for all versions anyway).
Since we're using Ansible I can work around that but I was wondering if there was any way to handle this better in a retro-compatible way.
Use "$releasever-stream" instead of just "$releasever". That will work (that's what the Mock configs and other things use).
Quack,
On 12/8/21 22:54, Neal Gompa wrote:
Use "$releasever-stream" instead of just "$releasever". That will work (that's what the Mock configs and other things use).
The mirrorlist setting is global in our config, which means that would break installing non-stream OSes. Of course we'll phaze this out at some point but we still need to be able to install EL7 (for our MLs, until fedora-infrastructure#8455 is done and all instances migrated successfully).
I guess this means I did not miss a new variable or method; I would have preferred to avoid hardcoding the stream suffix.
Anyway, thanks for your reply. _o<