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 from agent 1.x series fails #44

Closed
stevenscg opened this issue Jan 21, 2019 · 4 comments
Closed

Upgrade from agent 1.x series fails #44

stevenscg opened this issue Jan 21, 2019 · 4 comments
Assignees

Comments

@stevenscg
Copy link

This role does not appear to detect an existing installation of a 1.x version agent.

It fails on the Agent setup step as shown below because the tsagent is not available (that I could find).

Ansible version 2.7.5.

TASK [threatstack : Check if agent is v1.x] *************************************************************************************************************************
ok: [10.101.0.73]

TASK [threatstack : Define v1 variable] *****************************************************************************************************************************
ok: [10.101.0.73]

TASK [threatstack : Define v2 package URL variable] *****************************************************************************************************************
ok: [10.101.0.73]

TASK [threatstack : Ensure ThreatStack repo is installed.] **********************************************************************************************************
changed: [10.101.0.73]

TASK [threatstack : Add ThreatStack repo GPG key.] ******************************************************************************************************************
ok: [10.101.0.73]

TASK [threatstack : Ensure Agent is installed.] *********************************************************************************************************************
ok: [10.101.0.73]

TASK [threatstack : Get setup string] *******************************************************************************************************************************
ok: [10.101.0.73]

TASK [threatstack : Get checksum of setup string] *******************************************************************************************************************
ok: [10.101.0.73]

TASK [threatstack : Create file to track checksum of setup string] **************************************************************************************************
changed: [10.101.0.73]

TASK [threatstack : Get config string] ******************************************************************************************************************************
ok: [10.101.0.73]

TASK [threatstack : Get checksum of config string] ******************************************************************************************************************
ok: [10.101.0.73]

TASK [threatstack : debug] ******************************************************************************************************************************************
ok: [10.101.0.73] => {
    "msg": null
}

TASK [threatstack : Agent setup] ************************************************************************************************************************************
fatal: [10.101.0.73]: FAILED! => {"changed": false, "cmd": "tsagent setup -url https://app.threatstack.com -deploy-key XXXXX -ruleset 'Base Rule Set'", "msg": "[Errno 2] No such file or directory", "rc": 2}

PLAY RECAP **********************************************************************************************************************************************************
10.101.0.73                : ok=14   changed=2    unreachable=0    failed=1   

@Shplorf
Copy link
Contributor

Shplorf commented Jan 21, 2019

Yep, I think I see the issue. This happens when a version is not explicitly specified and an existing 1.x install is present. For now, if you want it to upgrade to 2.x, you can set threatstack_pkg to threatstack-agent-2.0.0 or threatstack-agent-2*. But yes, this is a bug in the role. Fix coming shortly. Thanks for writing it up!

@Shplorf Shplorf self-assigned this Jan 21, 2019
@stevenscg
Copy link
Author

Sounds good. I was going to work up a solution but ran out of time. I was able to verify that a clean install works just fine on CentOS 7.5.

@kbachand
Copy link

I'm having the same issue. Installing on a Ubuntu 16.04 machine and currently have a 1X agent installed.

@Shplorf
Copy link
Contributor

Shplorf commented Jan 24, 2019

Fixed in release v4.0.1

@Shplorf Shplorf closed this as completed Jan 24, 2019
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

3 participants