Project

Profile

Help

Issue #672

./run-tests.py drops all data in production database named in server.conf (yikes)

Added by bmbouter almost 7 years ago. Updated almost 3 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Urgent
Assignee:
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
3. High
Version:
2.6 Beta
Platform Release:
2.6.0
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

Running ./run-tests.py will drop your database!

To reproduce:
1. Checkout any branch that contains the commit 70274cf9be047708da930b25f93c9d3f4feb7f78. At the time of this writing that includes 2.6-dev, 2.6-testing, and master.

2. Have your server.conf be unmodified (ie: it should use pulp_database)

3. Run ./run-tests.py

4. Observe that afterwards all of your collections will have their documents missing.

Expected behavior: That all pulp tests would use pulp_unittest as the database and not even interact with the database named in server.conf

+ This bug was cloned from Bugzilla Bug #1184187 +

2c59e9b5aa8af366813e2026eb5ea7e6 (1009 Bytes) 2c59e9b5aa8af366813e2026eb5ea7e6 bmbouter, 03/01/2015 12:20 AM

History

#1 Updated by bmbouter almost 7 years ago

A script to reproduce.

Note this reproducer script will actually drop the database pulp_database! It assumes that pulp_database is your production database so you'll need that in your server.conf. pulp_database is the default so a vanilla server.conf is adequate.

This script will reproduce assuming your pulp checkout contains the commit 70274cf9be047708da930b25f93c9d3f4feb7f78.

To see the issue with the script observe it prints out a document count of the repo_content_units collection prior to running ./run-tests.py and again after I expect those numbers to be the same but they are not. For me it shows '39' prior and '0' after.

+ This comment was cloned from Bugzilla #1184187 comment 1 +

#2 Updated by bmbouter almost 7 years ago

This needed to be fixed in both platform and pulp_puppet. I checked all other plugins and they were not affected.

PRs available at:

https://github.com/pulp/pulp_puppet/pull/160
https://github.com/pulp/pulp/pull/1557

+ This comment was cloned from Bugzilla #1184187 comment 2 +

#3 Updated by bmbouter almost 7 years ago

Both PRs are merged 2.6-teseting -> 2.6-dev -> master

+ This comment was cloned from Bugzilla #1184187 comment 3 +

#4 Updated by bmbouter almost 7 years ago

There isn't a user facing way to verify this bug. The issue was severe, and other developers have tested it. Based on that I'm moving it to VERIFIED. We can reopen it if there turns out to be a problem.

+ This comment was cloned from Bugzilla #1184187 comment 4 +

#5 Updated by bmbouter almost 7 years ago

  • Severity changed from High to 3. High

#6 Updated by rbarlow over 6 years ago

  • Status changed from 6 to CLOSED - CURRENTRELEASE

#8 Updated by bmbouter almost 3 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF