voxpupuli / puppet-cassandra

Installs Cassandra & DataStax Agent on RHEL/Ubuntu/Debian.
https://forge.puppetlabs.com/puppet/cassandra
Apache License 2.0
13 stars 65 forks source link

Apache Cassandra's Debian and RedHat package repositories have moved #478

Closed jchoksijudopay closed 9 months ago

jchoksijudopay commented 10 months ago

Affected Puppet, Ruby, OS and module versions/distributions

How to reproduce (e.g Puppet code you use)

After the puppet-cassandra module has been used to install Cassandra onto a Centos 7 OS, you will find that it creates a yum repository config file at /etc/yum.repos.d/cassandra_apache.repo.

This file currently has the following lines in it:

[cassandra_apache]
name=Repo for Apache Cassandra
baseurl=http://www.apache.org/dist/cassandra/redhat/311x
enabled=1
gpgcheck=1
gpgkey=https://www.apache.org/dist/cassandra/KEYS

When you run:

yum clean all
yum update

You will get an error.

What are you seeing

---snip---
http://www.apache.org/dist/cassandra/redhat/311x/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
---snip---

What behaviour did you expect instead

I expected the yum repo to be accessible and updates to work normally.

Output log

[root@cassandra-1 yum.repos.d]# yum clean all
yuLoaded plugins: fastestmirror, gsiam, versionlock
Cleaning repos: base cassandra_apache duosecurity epel extras google-cloud-sdk google-compute-engine judo-yum-repo newrelic-infra puppet7 reaper updates
Cleaning up list of fastest mirrors
Other repos take up 3.8 M of disk space (use --verbose for details)
[root@cassandra-1 yum.repos.d]# yum update
Loaded plugins: fastestmirror, gsiam, versionlock
Determining fastest mirrors
epel/x86_64/metalink                                                                                                                                                               |  32 kB  00:00:00     
 * base: centos.mirrors.proxad.net
 * epel: ftp.plusline.net
 * extras: mirrors.ircam.fr
 * updates: distrib-coffee.ipsl.jussieu.fr
base                                                                                                                                                                               | 3.6 kB  00:00:00     
http://www.apache.org/dist/cassandra/redhat/311x/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
Trying other mirror.
To address this issue please refer to the below wiki article 

https://wiki.centos.org/yum-errors

If above article doesn't help to resolve this issue please use https://bugs.centos.org/.

 One of the configured repositories failed (Repo for Apache Cassandra),
 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=cassandra_apache ...

     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 cassandra_apache
        or
            subscription-manager repos --disable=cassandra_apache

     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=cassandra_apache.skip_if_unavailable=true

failure: repodata/repomd.xml from cassandra_apache: [Errno 256] No more mirrors to try.
http://www.apache.org/dist/cassandra/redhat/311x/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
[root@cassandra-1 yum.repos.d]# 

Any additional information you'd like to impart

According to https://cassandra.apache.org/_/download.html , it seems Apache have moved the Debian and Redhat package repositories.

I found that I had to manually change the /etc/yum.repos.d/cassandra_apache.repo file to:

[cassandra_apache]
name=Repo for Apache Cassandra
baseurl=https://redhat.cassandra.apache.org/311x/
enabled=1
gpgcheck=1
gpgkey=https://downloads.apache.org/cassandra/KEYS

to get updates to work.

Note, the instructions at https://cassandra.apache.org/_/download.html said:

For CentOS 7 and similar (rpm < 4.14), append the noboolean repository

We have rpm 4.11.3-48 and so I tried to use:

[cassandra_apache]
name=Repo for Apache Cassandra
baseurl=https://redhat.cassandra.apache.org/311x/noboolean/
enabled=1
gpgcheck=1
gpgkey=https://downloads.apache.org/cassandra/KEYS

but that didn't work for me.

I get:

[root@cassandra-1 yum.repos.d]# yum clean all
Loaded plugins: fastestmirror, gsiam, versionlock
Cleaning repos: base cassandra_apache duosecurity epel extras google-cloud-sdk google-compute-engine judo-yum-repo newrelic-infra puppet7 reaper updates
Cleaning up list of fastest mirrors
Other repos take up 3.8 M of disk space (use --verbose for details)
[root@cassandra-1 yum.repos.d]# yum update
Loaded plugins: fastestmirror, gsiam, versionlock
Determining fastest mirrors
epel/x86_64/metalink                                                                                                                                                               |  32 kB  00:00:00     
 * base: ftp.pasteur.fr
 * epel: b4sh.mm.fcix.net
 * extras: distrib-coffee.ipsl.jussieu.fr
 * updates: ftp.pasteur.fr
base                                                                                                                                                                               | 3.6 kB  00:00:00     
http://www.apache.org/dist/cassandra/redhat/311x/noboolean/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
Trying other mirror.
To address this issue please refer to the below wiki article 

https://wiki.centos.org/yum-errors

If above article doesn't help to resolve this issue please use https://bugs.centos.org/.

 One of the configured repositories failed (Repo for Apache Cassandra),
 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=cassandra_apache ...

     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 cassandra_apache
        or
            subscription-manager repos --disable=cassandra_apache

     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=cassandra_apache.skip_if_unavailable=true

failure: repodata/repomd.xml from cassandra_apache: [Errno 256] No more mirrors to try.
http://www.apache.org/dist/cassandra/redhat/311x/noboolean/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
[root@cassandra-1 yum.repos.d]# 

So it may be their instructions are wrong or that RH have patched whatever caused the noboolean bit to be needed into rpm version 4.11.3-48.

jchoksijudopay commented 9 months ago

Closing as it looks like this puppet module is not going to be maintained any further and this repo will be archived - https://github.com/voxpupuli/puppet-cassandra/issues/476