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

Kibana update via yum removes user #7924

Closed
EricVS opened this issue Aug 4, 2016 · 4 comments
Closed

Kibana update via yum removes user #7924

EricVS opened this issue Aug 4, 2016 · 4 comments

Comments

@EricVS
Copy link

EricVS commented Aug 4, 2016

Kibana version:
4.5.1-1

Elasticsearch version:
2.3.3

Server OS version:
CentOS 7

Browser version:
N/A

Browser OS version:
N/A

Original install method (e.g. download page, yum, from source, etc.):
yum

Description of the problem including expected versus actual behavior:
Action: yum update kibana
Expected behavior: kibana updated from version 4.5.1-1 to 4.5.4-1 and service started
Actual behavior: kibana updated from version 4.5.1-1 to 4.5.4-1, service not started and when trying to start throws error that kibana:kibana is invalid. The user did exist and this was a simple upgrade. I had to recreate user and group and make sure the permissions where set correctly on the files needed.

Steps to reproduce:

  1. yum update kibana (taking into account versions specified)
  2. service kibana start
  3. fix user and group, reset permissions, start service

Errors in browser console (if relevant):
N/A

Provide logs and/or server output (if relevant):
N/A

@jlruizmlg
Copy link

jlruizmlg commented Aug 4, 2016

Here the same problem, probably in the rpms specs to create the rpms don't use the correct state syntax

https://fedoraproject.org/wiki/Packaging:Scriptlets

Syntax

The basic syntax is similar to the %build, %install, and other sections of the rpm spec file. The scripts support a special flag, -p which allows the scriptlet to invoke a single program directly rather than having to spawn a shell to invoke the programs. (ie: %post -p /sbin/ldconfig)

The scriptlets also take an argument, passed into them by the controlling rpmbuild process. This argument, accessed via $1 is the number of packages of this name which will be left on the system when the action completes, except for %pretrans and %posttrans which are always run with $1 as 0 (%pretrans and %posttrans are available in rpm 4.4 and later). So for the common case of install, upgrade, and uninstall we have:

install         upgrade uninstall
 %pretrans  $1 == 0 $1 == 0 (N/A)
 %pre           $1 == 1 $1 == 2 (N/A)
 %post          $1 == 1 $1 == 2 (N/A)
 %preun (N/A)$1 == 1    $1 == 0
 %postun(N/A)$1 == 1    $1 == 0
 %posttrans $1 == 0 $1 == 0 (N/A)

To fix that the following commands work to me.

[root@elk kibana]# adduser kibana
[root@elk kibana]# chown -R kibana:kibana /opt/kibana/optimize
[root@elk kibana]# service kibana start
kibana started

@jwfuller
Copy link

jwfuller commented Aug 4, 2016

Same problem with RHEL. Similar steps to those mentioned by @jlruizmlg resolved.

@leo-baltus
Copy link

It seems there is no check on $1 in %postun, it should read
%postun
if [ $1 = 0 ]
userdel kibana
fi
also kibana is stopped but not restarted after upgrade, again check $1
if [ $1 -ge 1 ]; then
/sbin/service kibana restart >/dev/null 2>&1 || :
fi

@jbudz
Copy link
Member

jbudz commented Aug 4, 2016

Closing in favor of #6729, this should be fixed going forward. The fixes are in the 4.5.4 release but we need scripts from previous releases to cycle through and then things will start working better.

@jbudz jbudz closed this as completed Aug 4, 2016
cee-chen added a commit that referenced this issue Aug 5, 2024
`v95.5.0` ⏩ `v95.6.0`

_[Questions? Please see our Kibana upgrade
FAQ.](https://github.com/elastic/eui/blob/main/wiki/eui-team-processes/upgrading-kibana.md#faq-for-kibana-teams)_

---

## [`v95.6.0`](https://github.com/elastic/eui/releases/v95.6.0)

- Updated `EuiIcon` with a new `crossInCircle` glyph
([#7924](elastic/eui#7924))

**Bug fixes**

- Fixed `EuiEmptyPrompt` to correctly collapse and expand responsively
when used with custom breakpoints larger than the default `xl`
breakpoint ([#7935](elastic/eui#7935))

**Accessibility**

- Improved the experience of `EuiModal` by ensuring nested `EuiPopover`
closes on `Escape` keypress instead of the modal
([#7939](elastic/eui#7939))

**CSS-in-JS conversions**

- Converted `EuiDatePicker` to Emotion
([#7937](elastic/eui#7937))
  - Removed `$euiDatePickerCalendarWidth`
  - Removed `$euiDatePickerPadding`
  - Removed `$euiDatePickerGap`
  - Removed `$euiDatePickerCalendarColumns`
  - Removed `$euiDatePickerButtonSize`
  - Removed `$euiDatePickerMinControlWidth`
  - Removed `$euiDatePickerMaxControlWidth`
  - Removed `@mixin datePickerCaret`
  - Removed `@mixin datePickerArrow`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants