-
Notifications
You must be signed in to change notification settings - Fork 124
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
Add flag to conjurctl server to skip migrations #2895
Conversation
5612744
to
016489c
Compare
@telday I think we may need some tests added to |
30a5fe9
to
8ac49d3
Compare
@@ -42,6 +42,10 @@ | |||
c.default_value(ENV['PORT'] || '80') | |||
c.flag [ :p, :port ] | |||
|
|||
c.desc 'Skip running database migrations on start' | |||
c.default_value false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use parentheses for method calls with arguments.
@@ -15,6 +15,11 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. | |||
- Telemetry support | |||
[cyberark/conjur#2854](https://github.com/cyberark/conjur/pull/2854) | |||
|
|||
### Added | |||
- New flag to `conjurctl server` command called `--no-migrate` which allows for skipping |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lists should be surrounded by blank lines
8ac49d3
to
1e8d9a3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
1e8d9a3
to
2324d85
Compare
Code Climate has analyzed commit 2324d85 and detected 4 issues on this pull request. Here's the issue category breakdown:
The test coverage on the diff in this pull request is 100.0% (50% is the threshold). This pull request will bring the total coverage in the repository to 88.4% (-0.2% change). View more on Code Climate. |
Desired Outcome
Adds new flag to the
conjurctl server
command which allows for skipping the migrations step even when the Sequel gem would normally think we need to. This change is required by a k8s follower using selective replication. When a k8s follower boots with selective replication enabled it performs a schema dump instead of a full database backup which means theschema_migrations
andschema_info
tables containing what migrations the database has had applied is missing and therefore the Sequel gem attempts to apply all of them. This then causes errors when the migration attempts to create schema elements already present in the database.Implemented Changes
If the new
--no-migrate
flag is used the migration step is skipped when booting Conjur.Connected Issue/Story
Resolves #[relevant GitHub issue(s), e.g. 76]
CyberArk internal issue ID: [CNJR-1599]
Definition of Done
Changelog
CHANGELOG update
Test coverage
changes, or
Documentation
README
s) were updated in this PRBehavior
Security