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

[BACKPORT] Adding new flags to pkidestroy #93

Merged

Conversation

SilleBille
Copy link
Member

This PR is basically a squash of changes in master:
#79 - Add --force and --remove-logs flag to pki-destroy
#85 - Remove obsolete code
#92 - Reuse same instance log dirs (if exists)

The changes in this PR were hand-picked and not cherry-picked. A significant new change introduced by this PR:

  • Remove the pki_database_path dir instead of removing contents of the dir
    • This is moved to security_database.py instead of configuration.py

This PR resolves:
Bugs: 1372056, 1644769 and indirectly 1458010
Tickets: 1172, 3077

PS: This PR will be rebased to 10_5 branch to maintain commit history.

Resolves: Bug 1372056
Ticket: https://pagure.io/dogtagpki/issue/1172

List of changes with this commit:
- Adds new flag `--force` to pkidestroy to force remove a subsystem
- Use `os.path.join()` instead of appending '/' between path names
- Remove the `pki_database_path` dir instead of removing contents of the dir
    - This is moved to `security_database.py` instead of `configuration.py`
- pkidestroy and pkispawn logs are owned by `root` instead of configured pkiuser

Signed-off-by: Dinesh Prasanth M K<dmoluguw@redhat.com>
Partially resolves: Bug 1372056

List of changes by this commit:

- Logs are preserved by default (comment #1 in BZ)
- Add `--remove-flags` flag to pkidestroy to remove logs

Signed-off-by: Dinesh Prasanth M K <dmoluguw@redhat.com>
This commit removes obsolete code

Signed-off-by: Dinesh Prasanth M K <dmoluguw@redhat.com>
Resolves: Bug 1644769
Ticket: https://pagure.io/dogtagpki/issue/3077

- `pkidestroy` behaviour was chagned to preserve the logs by default.
  When `pkispawn` is run, it throws a name space collision error.
- This patch reuses the log dir and appends logs to the same log dir
  structure (if exists) and logs it accordingly.

`Signed-off-by: Dinesh Prasanth M K <dmoluguw@redhat.com>`
@SilleBille SilleBille changed the title Pki destroy 79 85 92 [BACKPORT] Adding new flags to pkidestroy Nov 1, 2018
@SilleBille SilleBille added Enhancement New features and enhancements related to the product Backport Already existing patch to be included in different release labels Nov 1, 2018
Copy link
Contributor

@edewata edewata left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

SilleBille referenced this pull request in SilleBille/pki Nov 1, 2018
- Skip loading file if cs_conf doesn't exist
- Reformat log error in initialization

Signed-off-by: Dinesh Prasanth M K <dmoluguw@redhat.com>
@SilleBille SilleBille force-pushed the pki_destroy_79_85_92 branch from 3b3ffdd to fd8bdc6 Compare November 1, 2018 22:25
SilleBille referenced this pull request in SilleBille/pki Nov 1, 2018
- Skip loading file if cs_conf doesn't exist
- Reformat log error in initialization

Signed-off-by: Dinesh Prasanth M K <dmoluguw@redhat.com>
- Skip loading file if cs_conf doesn't exist
- Reformat log error in initialization

Signed-off-by: Dinesh Prasanth M K <dmoluguw@redhat.com>
@SilleBille SilleBille force-pushed the pki_destroy_79_85_92 branch from fd8bdc6 to 6a22c8e Compare November 1, 2018 22:26
@SilleBille
Copy link
Member Author

There was a minor bug which I added to it. Thanks for the review! Merging...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backport Already existing patch to be included in different release Enhancement New features and enhancements related to the product
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants