Yum install: unexpected nothing to do while upgrading elasticsearch

I'm experimenting something estrange with yum in centos7, lets see If someone understands what's happening:

Usually, I upgrade packages using sudo yum install <package_name>-<version_info>, for example, right now, I'm trying to do an upgrade of elasticsearch package from v6.7.1 to 7.1.1. To do that, I first need (suggested by the Elasticsearch documentation) to upgrade to 6.8.0, so I executed yum install elasticsearch-6.8.0 and the package was correcty upgraded.

Now, if I check the version of Elasticsearch, I got:

[root@centos7 vagrant]# rpm -qa | grep elasticsearch
elasticsearch-6.8.0-1.noarch

Now, I add the Elasticsearch repositories for 7.x with:

# rpm --import https://packages.elastic.co/GPG-KEY-elasticsearch
# cat > /etc/yum.repos.d/elastic.repo << EOF
[elasticsearch-7.x]
name=Elasticsearch repository for 7.x packages
baseurl=https://artifacts.elastic.co/packages/7.x/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=1
autorefresh=1
type=rpm-md
EOF

and check that the package elasticsearch-7.1.1 exists and is available:

[root@centos7 vagrant]# yum --showduplicates list elasticsearch | expand | grep 7.
elasticsearch.noarch                 6.7.0-1                  elasticsearch-6.x 
elasticsearch.noarch                 6.7.1-1                  elasticsearch-6.x 
elasticsearch.noarch                 6.7.2-1                  elasticsearch-6.x 
elasticsearch.x86_64                 7.0.0-1                  elasticsearch-7.x 
elasticsearch.x86_64                 7.0.1-1                  elasticsearch-7.x 
elasticsearch.x86_64                 7.1.0-1                  elasticsearch-7.x 
elasticsearch.x86_64                 7.1.1-1                  elasticsearch-7.x 
elasticsearch.x86_64                 7.2.0-1                  elasticsearch-7.x 

But, if I try to install elasticsearch-7.1.1 using yum install I got:

[root@centos7 vagrant]# yum install elasticsearch-7.1.1
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.tedra.es
 * extras: mirror.gadix.com
 * updates: mirror.gadix.com
Nothing to do

And, if I try to use upgrade-to, I found this interesting issue:

[root@centos7 vagrant]# yum upgrade-to elasticsearch-7.1.1
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.tedra.es
 * extras: mirror.gadix.com
 * updates: mirror.gadix.com
Package(s) elasticsearch-7.1.1 available, but not installed.
No packages marked for update

Package(s) elasticsearch-7.1.1 available, but not installed.

If I try just, yum install elasticsearch it let me upgrade to 7.2.0

What could be going on? why yum said elasticsearch is not installed? Look at the output of the following command:

[root@centos7 vagrant]# yum list installed | grep elasticsearch
elasticsearch.noarch               6.8.0-1                    @elasticsearch-6.x
kibana.x86_64                      6.8.0-1                    @elasticsearch-6.x
logstash.noarch                    1:6.8.0-1                  @elasticsearch-6.x

I hope someone can help me. Greetings and thank you very much.

Running with --verbose don't give us so much more information

Loading "fastestmirror" plugin
Config time: 0.005
Yum version: 3.4.3
rpmdb time: 0.000
Setting up Package Sacks
Loading mirror speeds from cached hostfile
 * base: mirror.tedra.es
 * extras: mirror.gadix.com
 * updates: mirror.gadix.com
pkgsack time: 0.009
Building updates object
up:Obs Init time: 0.069
up:simple updates time: 0.004
up:obs time: 0.001
up:condense time: 0.000
updates time: 0.148
Nothing to do

If I try to download the package manually and install it I can upgrade without any problem, but I would like to understand what happening with the repository.

wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.1.1-x86_64.rpm
yum install elasticsearch-7.1.1-x86_64.rpm
1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.