Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CentOS 8.3 xCAT 3.0 copycds can't recognize cumulus image #6947

Closed
davisgoodman opened this issue Apr 18, 2021 · 5 comments
Closed

CentOS 8.3 xCAT 3.0 copycds can't recognize cumulus image #6947

davisgoodman opened this issue Apr 18, 2021 · 5 comments
Assignees
Labels
cumulus tickets on cumulus os support type:bug
Milestone

Comments

@davisgoodman
Copy link

When trying to create an osimage of the cumulus binary I get this error:

[root@cdw-mgmt-hpc ~]# copycds -i /install/custom/sw_os/cumulus/cumulus-linux-4.1.1-bcm-armel.bin
Error: [cdw-mgmt-hpc]: copycds was unable to mount /install/custom/sw_os/cumulus/cumulus-linux-4.1.1-bcm-armel.bin to /var/run/xcat/mountpoint/e60719fdefbde196d401de800e9caa18.

Was on CentOS 8.2 and had the same issue

@besawn
Copy link
Member

besawn commented Apr 27, 2021

Hi, this problem is due to changes in the output of the file command between RHEL 7 and RHEL 8.

xCAT uses the file command inside of copycds to try to determine the type of file that is being passed in to take the appropriate code path.

On RHEL 7 (and related OSes), the output returned looks like:

[root@stratton01 ~]# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 7.3 (Maipo)

[root@stratton01 ~]# rpm -q --whatprovides /usr/bin/file
file-5.11-33.el7.ppc64le

[root@stratton01 ~]# file /mnt/xcat/iso/cumulus/cumulus_mlx/cumulus-linux-3.5.3-bcm-armel.bin 
/mnt/xcat/iso/cumulus/cumulus_mlx/cumulus-linux-3.5.3-bcm-armel.bin: data

On RHEL 8 (and related OSes), the output returned looks like:

[root@boston02 cumulus_mlx]# cat /etc/redhat-release 
Red Hat Enterprise Linux release 8.1 (Ootpa)

[root@boston02 cumulus_mlx]# rpm -q --whatprovides /usr/bin/file
file-5.33-8.el8.ppc64le

[root@boston02 cumulus_mlx]# file /xcat/iso/cumulus/cumulus_mlx/cumulus-linux-3.5.3-bcm-armel.bin 
/xcat/iso/cumulus/cumulus_mlx/cumulus-linux-3.5.3-bcm-armel.bin: POSIX shell script executable (binary data)

We will implement a permanent fix, but you should be able to use a workaround like this on your current MN:

 [root@boston02 cumulus_mlx]# copycds cumulus-linux-3.5.3-bcm-armel.bin
Error: [boston02]: copycds was unable to mount /xcat/iso/cumulus/cumulus_mlx/cumulus-linux-3.5.3-bcm-armel.bin to /var/run/xcat/mountpoint/40ed357bf0047cd99f260de083598e61.

[root@boston02 cumulus_mlx]# cp -p /opt/xcat/lib/perl/xCAT_plugin/copycds.pm /opt/xcat/lib/perl/xCAT_plugin/copycds.pm.orig

[root@boston02 cumulus_mlx]# vi /opt/xcat/lib/perl/xCAT_plugin/copycds.pm

[root@boston02 cumulus_mlx]# diff /opt/xcat/lib/perl/xCAT_plugin/copycds.pm /opt/xcat/lib/perl/xCAT_plugin/copycds.pm.orig
118c118
<             if (grep /$file: .* data/, @filestat) {
---
>             if (grep /$file: data/, @filestat) {

[root@boston02 cumulus_mlx]# copycds cumulus-linux-3.5.3-bcm-armel.bin
Copying media to /install/cumulus3.5.3/armel
Media copy operation successful
The image cumulus3.5.3-armel is created.

@davisgoodman
Copy link
Author

davisgoodman commented Apr 27, 2021 via email

@davisgoodman
Copy link
Author

davisgoodman commented Apr 27, 2021 via email

@davisgoodman
Copy link
Author

davisgoodman commented Apr 27, 2021

This seems to have fix it:

[root@cdw-mgmt-hpc xCAT_plugin]# diff onie.pm onie.pm.orig
21a22
>
308c309
<             if (grep /$image_pkgdir: .* data/, @filestat) {
---
>             if (grep /$image_pkgdir: data/, @filestat) {

@peterwywong
Copy link
Contributor

The section of "Full Install" at https://xcat-docs.readthedocs.io/en/stable/advanced/networks/onie_switches/os_cumulus/upgrade.html provides the commands to upgrade ONIE switches with new Cumulus Linux versions.

Note that rinstall is not used here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cumulus tickets on cumulus os support type:bug
Projects
None yet
Development

No branches or pull requests

3 participants