Graylog2 / graylog-ansible-role

Ansible role which installs and configures Graylog
Apache License 2.0
212 stars 127 forks source link

Updating to new graylog version fails because of stale graylog_repository.deb file #74

Closed hnk closed 4 years ago

hnk commented 7 years ago

Hello everyone,

we just experienced an edge case that happens when one tries to update graylog from the 2.1 repository to the 2.2 repository.

We have been running a testing instance of graylog 2.1.2 for some time and I wanted to rerun the ansible role to update the machine.

Inside the setup-Debian.yml file a task Graylog repository package should be downloaded is called:

- name: Graylog repository package should be downloaded
  get_url:
    url: "{{ graylog_apt_deb_url }}"
    dest: '/tmp/graylog_repository.deb'

The problem we ran into: Because the machine has never been rebooted, the destination file still existed but was the deb file for the 2.1 repository. So get_url did not overwrite it and the job then installed the 2.1 repository again and then tried to install graylog-server=2.2.3-1 This fails, of course.

I will shortly send a merge request that fixes this by saving the repository file with its base version added.

I cannot test if a similar issue exists with rpm distributions.

danvaida commented 7 years ago

please see my comment here.

mariussturm commented 7 years ago

@hnk yeah, like @danvaida said the automated update is a little bit problamatic. Sometimes there are manual steps to do like running migrations and whatnot. If this would work automatically users would expect that these steps are also done properly for each version update. So having a breakpoint is actually something good.

hnk commented 7 years ago

I understand the point you made and support the decision.

Then there are some issues at hand:

malcyon commented 4 years ago

@mariussturm Instead of leaving it broken, maybe we should force users to declare the version of Graylog they want explicitly? Then it's an active choice by them.