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

Fix dashboard init trying to ask for confirmation when overwriting existing db #123

Conversation

bmalynovytch
Copy link
Contributor

Fix dashboard init trying to ask for confirmation when overwriting existing db (don't overwrite)

Fixes #86

@LaurenceJJones
Copy link
Contributor

From a quick test it does not seem to work as intended?

podman run -v /tmp/:/tmp/ busybox sleep 2 && wget --no-check-certificate "https://crowdsec-statics-assets.s3-eu-west-1.amazonaws.com/metabase_sqlite.zip" && unzip metabase_sqlite.zip -nd /tmp/
--2023-12-03 09:57:24--  https://crowdsec-statics-assets.s3-eu-west-1.amazonaws.com/metabase_sqlite.zip
Loaded CA certificate '/etc/ssl/certs/ca-certificates.crt'
Resolving crowdsec-statics-assets.s3-eu-west-1.amazonaws.com (crowdsec-statics-assets.s3-eu-west-1.amazonaws.com)... 52.92.35.162, 52.218.44.242, 52.218.108.16, ...
Connecting to crowdsec-statics-assets.s3-eu-west-1.amazonaws.com (crowdsec-statics-assets.s3-eu-west-1.amazonaws.com)|52.92.35.162|:443... connected.
HTTP request sent, awaiting response... 416 Requested Range Not Satisfiable

The file is already fully retrieved; nothing to do.

Archive:  metabase_sqlite.zip
caution: filename not matched:  -nd
caution: filename not matched:  /tmp/

Checking /tmp/ has no metabase files even on an empty directory?

@bmalynovytch
Copy link
Contributor Author

@LaurenceJJones did you run this in the busybox image provided in the chart ?

This fix definitely did the trick in multiple environments.

@LaurenceJJones
Copy link
Contributor

@LaurenceJJones did you run this in the busybox image provided in the chart ?

This fix definitely did the trick in multiple environments.

Yes, they both use docker.io busybox container. Did you test for when the directory is empty EG on the first deployment?

@bmalynovytch
Copy link
Contributor Author

@LaurenceJJones did you run this in the busybox image provided in the chart ?
This fix definitely did the trick in multiple environments.

Yes, they both use docker.io busybox container. Did you test for when the directory is empty EG on the first deployment?

Sure !

@he2ss
Copy link
Member

he2ss commented Mar 21, 2024

Hi @bmalynovytch,

I think this PR needs to be rebased on main to get the lastest update on your other PR we merged recently.

@he2ss he2ss added this to the crowdsec-0.10 milestone Apr 2, 2024
@he2ss he2ss modified the milestones: crowdsec-0.10, crowdsec-0.11 Apr 23, 2024
@bmalynovytch bmalynovytch force-pushed the fix-dashboard-init-metabase-overwrite-confirmation branch from 55f83cf to b4bbf8c Compare September 2, 2024 10:32
@github-actions github-actions bot added needs/kind Kind label required needs/area labels Sep 2, 2024
@bmalynovytch
Copy link
Contributor Author

Sorry @he2ss, I missed the notification 😞

@bmalynovytch
Copy link
Contributor Author

/kind fix
/area local-api

@github-actions github-actions bot added kind/fix fixing a bug area/local-api and removed needs/kind Kind label required needs/area labels Sep 2, 2024
@he2ss he2ss self-requested a review September 3, 2024 08:45
@he2ss he2ss merged commit 5959fe4 into crowdsecurity:main Sep 3, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants