Upgrading Elasticsearch RPM 1.0.0 Removes user and group

Hi,

Unless I am missing something obvious (and i might be) an upgrade of
elasticsearch on centos removes the elasticsearch user and group previously
added by the package. This of course stops elasticsearch from been able to
start. Is anyone else able to reproduce this or am i just loosing the plot
:slight_smile:

Example on centos 5.7 for reference:

yum info elasticsearch
Loaded plugins: fastestmirror
Installed Packages
Name : elasticsearch
Arch : noarch
Version : 0.90.1
Release : 1
Size : 19 M
Repo : installed
Summary : elasticsearch
License : 2013, Elasticsearch
Description: ElasticSearch - Open Source, Distributed, RESTful Search Engine

id elasticsearch
uid=106(elasticsearch) gid=106(elasticsearch) groups=106(elasticsearch)
context=system_u:system_r:unconfined_t:SystemLow-SystemHigh

sudo yum upgrade ./elasticsearch-1.0.0.noarch.rpm --nogpgcheck
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile

  • base: mirror.sov.uk.goscomb.net
  • extras: mirror.simwood.com
  • updates: mirror.simwood.com
    Setting up Upgrade Process
    Examining ./elasticsearch-1.0.0.noarch.rpm: elasticsearch-1.0.0-1.noarch
    Marking ./elasticsearch-1.0.0.noarch.rpm as an update to
    elasticsearch-0.90.1-1.noarch
    Resolving Dependencies
    --> Running transaction check
    ---> Package elasticsearch.noarch 0:1.0.0-1 set to be updated
    --> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================================================================================
Package Arch
Version Repository
Size

Updating:
elasticsearch noarch
1.0.0-1 /elasticsearch-1.0.0.noarch
20 M

Transaction Summary

Install 0 Package(s)
Upgrade 1 Package(s)

Total size: 20 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Updating : elasticsearch

     1/2

Cleanup : elasticsearch

     2/2

Removing elasticsearch user and group if existing

Updated:
elasticsearch.noarch 0:1.0.0-1

Complete!

id elasticsearch
id: elasticsearch: No such user

Regards
Steve.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/710c4399-fcda-4934-83f9-342e56c114fa%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

HI Steven,
Although I'm not part of the ES team, because I have an "old" ES 0.90.10
node on CentOS 6.5 I wanted to upgrade to 1.0 anyway, I went ahead and more
or less replicated what you did...

The original ES 0.90.10 was installed from the downloaded RPM (because no
repos existed then).
Added the new CentOS yum repos with the configuration described on

(I will likely post a GIST since IMO it's a lot of unnecessary work to
configure something like this if you don't do it regularly)

  1. yum upgrade
    Of course it won't find the existing ES because it wasn't installed from
    repo.

  2. yum install elasticsearch
    Note that I didn't try to specify a specific package, this results in
    letting yum install the current latest stable.

Result is that I didn't see the "removing elasticsearch user and group if
existing"
And "id" returns an elasticsearch user and group.

So, for starters I'd recommend you follow my steps, if a package upgrade
doesn't happen, maybe remove and re-install elasticsearch.

That said, I haven't seen how the elasticsearch user is being implemented
anywhere (maybe someone can enlighten?). I see elasticsearch installed and
running as root-root. It would be a prudent idea to run elasticsearch not
as root if it's possible (I imagine it might require configuring access to
libraries and paths).

HTH and IMO,
Tony

On Wednesday, February 19, 2014 9:05:11 AM UTC-8, Steven Williamson wrote:

Hi,

Unless I am missing something obvious (and i might be) an upgrade of
elasticsearch on centos removes the elasticsearch user and group previously
added by the package. This of course stops elasticsearch from been able to
start. Is anyone else able to reproduce this or am i just loosing the plot
:slight_smile:

Example on centos 5.7 for reference:

yum info elasticsearch
Loaded plugins: fastestmirror
Installed Packages
Name : elasticsearch
Arch : noarch
Version : 0.90.1
Release : 1
Size : 19 M
Repo : installed
Summary : elasticsearch
License : 2013, Elasticsearch
Description: Elasticsearch - Open Source, Distributed, RESTful Search
Engine

id elasticsearch
uid=106(elasticsearch) gid=106(elasticsearch) groups=106(elasticsearch)
context=system_u:system_r:unconfined_t:SystemLow-SystemHigh

sudo yum upgrade ./elasticsearch-1.0.0.noarch.rpm --nogpgcheck
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile

  • base: mirror.sov.uk.goscomb.net
  • extras: mirror.simwood.com
  • updates: mirror.simwood.com
    Setting up Upgrade Process
    Examining ./elasticsearch-1.0.0.noarch.rpm: elasticsearch-1.0.0-1.noarch
    Marking ./elasticsearch-1.0.0.noarch.rpm as an update to
    elasticsearch-0.90.1-1.noarch
    Resolving Dependencies
    --> Running transaction check
    ---> Package elasticsearch.noarch 0:1.0.0-1 set to be updated
    --> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================================================================================
Package Arch
Version Repository
Size

====================================================================================================================================================================
Updating:
elasticsearch noarch
1.0.0-1 /elasticsearch-1.0.0.noarch
20 M

Transaction Summary

====================================================================================================================================================================
Install 0 Package(s)
Upgrade 1 Package(s)

Total size: 20 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Updating : elasticsearch

     1/2

Cleanup : elasticsearch

     2/2

Removing elasticsearch user and group if existing

Updated:
elasticsearch.noarch 0:1.0.0-1

Complete!

id elasticsearch
id: elasticsearch: No such user

Regards
Steve.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/49bf6640-e264-43d7-9819-b44bf05e1750%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Steven,
Forgot to mention an issue which might be important to you...

On one test run I did awhile back when I removed elasticsearch entirely and
re-installed, I discovered it had replace my customized elasticsearch.yml
with the default which IMO is the behavior.

To guard against this, if you remove elasticsearch with the intention of
re-installing you should first cp elasticsearch.yml and maybe even
/etc/sysconfig/elasticsearch

Tony

On Wednesday, February 19, 2014 9:05:11 AM UTC-8, Steven Williamson wrote:

Hi,

Unless I am missing something obvious (and i might be) an upgrade of
elasticsearch on centos removes the elasticsearch user and group previously
added by the package. This of course stops elasticsearch from been able to
start. Is anyone else able to reproduce this or am i just loosing the plot
:slight_smile:

Example on centos 5.7 for reference:

yum info elasticsearch
Loaded plugins: fastestmirror
Installed Packages
Name : elasticsearch
Arch : noarch
Version : 0.90.1
Release : 1
Size : 19 M
Repo : installed
Summary : elasticsearch
License : 2013, Elasticsearch
Description: Elasticsearch - Open Source, Distributed, RESTful Search
Engine

id elasticsearch
uid=106(elasticsearch) gid=106(elasticsearch) groups=106(elasticsearch)
context=system_u:system_r:unconfined_t:SystemLow-SystemHigh

sudo yum upgrade ./elasticsearch-1.0.0.noarch.rpm --nogpgcheck
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile

  • base: mirror.sov.uk.goscomb.net
  • extras: mirror.simwood.com
  • updates: mirror.simwood.com
    Setting up Upgrade Process
    Examining ./elasticsearch-1.0.0.noarch.rpm: elasticsearch-1.0.0-1.noarch
    Marking ./elasticsearch-1.0.0.noarch.rpm as an update to
    elasticsearch-0.90.1-1.noarch
    Resolving Dependencies
    --> Running transaction check
    ---> Package elasticsearch.noarch 0:1.0.0-1 set to be updated
    --> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================================================================================
Package Arch
Version Repository
Size

====================================================================================================================================================================
Updating:
elasticsearch noarch
1.0.0-1 /elasticsearch-1.0.0.noarch
20 M

Transaction Summary

====================================================================================================================================================================
Install 0 Package(s)
Upgrade 1 Package(s)

Total size: 20 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Updating : elasticsearch

     1/2

Cleanup : elasticsearch

     2/2

Removing elasticsearch user and group if existing

Updated:
elasticsearch.noarch 0:1.0.0-1

Complete!

id elasticsearch
id: elasticsearch: No such user

Regards
Steve.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/92907d16-ea56-491d-94af-823a21fe166a%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Steve,

There was a bug in 0.90.1 that caused this. The Elasticsearch user would
be removed and re-added with a new ID during an upgrade. That was fixed
for 0.90.2. Sorry about the bug.

Kevin

On Wed, Feb 19, 2014 at 9:05 AM, Steven Williamson steven43126@gmail.comwrote:

Hi,

Unless I am missing something obvious (and i might be) an upgrade of
elasticsearch on centos removes the elasticsearch user and group previously
added by the package. This of course stops elasticsearch from been able to
start. Is anyone else able to reproduce this or am i just loosing the plot
:slight_smile:

Example on centos 5.7 for reference:

yum info elasticsearch
Loaded plugins: fastestmirror
Installed Packages
Name : elasticsearch
Arch : noarch
Version : 0.90.1
Release : 1
Size : 19 M
Repo : installed
Summary : elasticsearch
License : 2013, Elasticsearch
Description: Elasticsearch - Open Source, Distributed, RESTful Search
Engine

id elasticsearch
uid=106(elasticsearch) gid=106(elasticsearch) groups=106(elasticsearch)
context=system_u:system_r:unconfined_t:SystemLow-SystemHigh

sudo yum upgrade ./elasticsearch-1.0.0.noarch.rpm --nogpgcheck
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile

  • base: mirror.sov.uk.goscomb.net
  • extras: mirror.simwood.com
  • updates: mirror.simwood.com
    Setting up Upgrade Process
    Examining ./elasticsearch-1.0.0.noarch.rpm: elasticsearch-1.0.0-1.noarch
    Marking ./elasticsearch-1.0.0.noarch.rpm as an update to
    elasticsearch-0.90.1-1.noarch
    Resolving Dependencies
    --> Running transaction check
    ---> Package elasticsearch.noarch 0:1.0.0-1 set to be updated
    --> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================================================================================
Package Arch
Version Repository
Size

====================================================================================================================================================================
Updating:
elasticsearch noarch
1.0.0-1 /elasticsearch-1.0.0.noarch
20 M

Transaction Summary

====================================================================================================================================================================
Install 0 Package(s)
Upgrade 1 Package(s)

Total size: 20 M
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Updating : elasticsearch

     1/2

Cleanup : elasticsearch

     2/2

Removing elasticsearch user and group if existing

Updated:
elasticsearch.noarch 0:1.0.0-1

Complete!

id elasticsearch
id: elasticsearch: No such user

Regards
Steve.

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/710c4399-fcda-4934-83f9-342e56c114fa%40googlegroups.com
.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAB1XBh94Mha%2BwT06n66A-qN5VF03tLBHe2KcZzeH3Qw03NUdVQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.