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

[container] can't upgrade crowdsecurity/linux: downloaded but not installed #2779

Closed
LaurenceJJones opened this issue Jan 24, 2024 · 1 comment · Fixed by #2780
Closed

[container] can't upgrade crowdsecurity/linux: downloaded but not installed #2779

LaurenceJJones opened this issue Jan 24, 2024 · 1 comment · Fixed by #2780
Labels
kind/bug Something isn't working needs/triage

Comments

@LaurenceJJones
Copy link
Contributor

LaurenceJJones commented Jan 24, 2024

What happened?

Version v1.6.0 users may get

Running: cscli  collections upgrade "crowdsecurity/linux" 

time="2024-01-24T23:08:39+02:00" level=fatal msg="can't upgrade crowdsecurity/linux: downloaded but not installed"

On changing to newer tag, issue happens when the container is trying to upgraded a package that "should" exist.

Here is a patcher bash script just change the VOLUME_NAME to the persisted configuration volume (Also needs jq packages installed just because its easier to parse json response)

Depending on your configuration you may need to run the script as sudo

#!/bin/bash
VOLUME_NAME=crowdsec-config
CURR_CWD=$(pwd)
cd $(docker volume inspect "$VOLUME_NAME" | jq -r .[].Mountpoint)
cd collections && ln -s /etc/crowdsec/hub/collections/crowdsecurity/linux.yaml .
cd ../parsers/s02-enrich/ && ln -s /etc/crowdsec/hub/parsers/s02-enrich/crowdsecurity/whitelists.yaml .
cd $CURR_CWD

What did you expect to happen?

The docker start script presumes the user will have these collections we already decided that we should just run cscli hub upgrade instead of individually picking ones

How can we reproduce it (as minimally and precisely as possible)?

N/A

Anything else we need to know?

No response

Crowdsec version

$ cscli version
# paste output here

OS version

# On Linux:
$ cat /etc/os-release
# paste output here
$ uname -a
# paste output here

# On Windows:
C:\> wmic os get Caption, Version, BuildNumber, OSArchitecture
# paste output here

Enabled collections and parsers

$ cscli hub list -o raw
# paste output here

Acquisition config

```console # On Linux: $ cat /etc/crowdsec/acquis.yaml /etc/crowdsec/acquis.d/* # paste output here

On Windows:

C:> Get-Content C:\ProgramData\CrowdSec\config\acquis.yaml

paste output here

Config show

$ cscli config show
# paste output here

Prometheus metrics

$ cscli metrics
# paste output here

Related custom configs versions (if applicable) : notification plugins, custom scenarios, parsers etc.

@LaurenceJJones LaurenceJJones added the kind/bug Something isn't working label Jan 24, 2024
Copy link

@LaurenceJJones: Thanks for opening an issue, it is currently awaiting triage.

In the meantime, you can:

  1. Check Crowdsec Documentation to see if your issue can be self resolved.
  2. You can also join our Discord.
  3. Check Releases to make sure your agent is on the latest version.
Details

I am a bot created to help the crowdsecurity developers manage community feedback and contributions. You can check out my manifest file to understand my behavior and what I can do. If you want to use this for your project, you can check out the BirthdayResearch/oss-governance-bot repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working needs/triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant