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

Upgrade fails when latest download already exists #25

Closed
rwarsing opened this issue Jun 16, 2016 · 12 comments
Closed

Upgrade fails when latest download already exists #25

rwarsing opened this issue Jun 16, 2016 · 12 comments
Assignees
Labels

Comments

@rwarsing
Copy link

Upgrading will fail if the 'rocket.chat-0.X.0.tgz' file has been previously downloaded but not applied.

@taybin
Copy link

taybin commented Jun 20, 2016

I've noticed this too.

@cmacrae
Copy link

cmacrae commented Jun 20, 2016

I'm away on holiday at the moment. I'll take a look at fixing this when I'm back home.

@jlgore
Copy link

jlgore commented Jun 23, 2016

I'm also noticing this, but also noticing if I remove the tarball the playbook fails w/this:

TASK [RocketChat.Server : Fetch the Rocket.Chat binary tarball] ****************
changed: [chat]

RUNNING HANDLER [RocketChat.Server : Upgrade Rocket.Chat] **********************
ERROR! Unexpected Exception: 'TaskInclude' object has no attribute 'has_triggered'

@PeterMosmans
Copy link

The Upgrade Rocket.Chat handler seems to be b0rked if no previous version has been installed.
Quick and dirty hack for the above problem: Remark line 96 of tasks/main.yml (notify: Upgrade Rocket.Chat)

@jlgore
Copy link

jlgore commented Jul 8, 2016

I've been able to update this particular instance a few times before, but for some reason I can't move this install past 0.33.0 at all. I tried commenting out line 96 like you mentioned but it still doesn't upgrade. It will fetch the 0.35.0 tgz just fine, but skips the unpacking stage.

TASK [RocketChat.Server : Fetch the Rocket.Chat binary tarball] ****************
changed: [chatserver]

TASK [RocketChat.Server : Unpack the Rocket.Chat binary tarball] ***************
skipping: [chatserver]

TASK [RocketChat.Server : Install Rocket.Chat via NPM] *************************
ok: [chatserver]

If there's anything else I can try to test or help please let me know.

@xenithorb
Copy link
Collaborator

#26 fixes this

@xenithorb xenithorb self-assigned this Aug 14, 2016
@xenithorb xenithorb added the bug label Aug 14, 2016
@jlgore
Copy link

jlgore commented Aug 26, 2016

Hi @xenithorb I downloaded the latest from Galaxy and ran it on my instance that won't update. I get this when I run the playbook now:

TASK [RocketChat.Server : Fetch the Rocket.Chat binary tarball] **************** ERROR! The requested handler 'Upgrade Rocket.Chat' was not found in any of the known handlers

Any ideas? Thanks!

@xenithorb
Copy link
Collaborator

xenithorb commented Aug 26, 2016

That's a separate issue and it should have been fixed by: fd90707

Don't forget that if you've pinned the version, you need to move that in your own playbook - i.e. v2.0 should now be v2.2.0

If you want the latest version each time, use the master branch now, as I rebased that against v2.0 a few days ago. I wish I had a better way to announce that, I suppose I could bold something on the top of the README for a bit.

@xenithorb
Copy link
Collaborator

Additionally, a great way of checking on the version is looking at: https://galaxy.ansible.com/RocketChat/Server/ the most recent tag will be at the top

@jlgore
Copy link

jlgore commented Aug 26, 2016

THANK YOU SO MUCH. My hero. When I get paid I'm donating to the project again, you guys are doing the work!

@xenithorb
Copy link
Collaborator

Going to merge #28 once the build completes (silly to have to do that for README but it is what it is), hopefully that helps with some confusion.

xenithorb added a commit that referenced this issue Sep 14, 2016
@xenithorb
Copy link
Collaborator

OK. So the situation has changed here a bit, there are now three possible states (as soon as the builds pass and I get 5e11c0a and bcc487c merged into master)

  1. With "new feature" rocket_chat_tarball_check_checksum == false the checksum is omitted AND the force: parameter to get_url is set to yes, AND the result is always changed alert the following task that checks for result|changed. This effectively means it will download and overwrite the tarball at all costs.
  2. With rocket_chat_tarball_check_checksum == true (the default still for security) - the checksum: parameter to get_url checks the file's hash and if it's different it downloads the file again, and reports as changed. So if you change the checksum manually, and the file doesn't match locally, it will overwrite it in an attempt to "find" the right file remotely.
  3. The third and still "bad" state is when something goes wrong with ERROR: become_user is not a legal parameter in an Ansible task or handler #2 within the upgrade.yml file, if that condition occurs, the correct file has been downloaded but the RC server hasn't been upgraded properly, and I need to think a little more about that. Currently to rectify that, consider just deleting the remote tarball so that it forced the play to download it over again and continue the upgrade process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants