- Notifications
You must be signed in to change notification settings - Fork 311
Open
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behaviorcomponent: coreusability
Description
Currently, intelmqsetup calls intelmq upgrade-config also on new installations. This results in a lot of "nothing to do" migrations:
Calling `intelmqctl upgrade-config` to update/create state file. Writing initial state file. Successfully wrote initial state file. Found no previous version or forced, doing all upgrades. Upgrading to version 1.0.0.dev7. Migrate modify bot configuration format: Nothing to do. Upgrading to version 1.1.0. Replace deprecated Shadowserver feednames: Nothing to do. Checking for deprecated runtime configurations (stomp collector, cymru parser, ripe expert, collector feed parameter): Nothing to do. Upgrading to version 1.1.1. ... and so on.
Instead, for new installations, an "empty" state.conf file should be created, like we do it with the packages: https://build.opensuse.org/package/view_file/home:sebix:intelmq/intelmq/state.json?expand=1
Before
intelmq/intelmq/bin/intelmqsetup.py
Lines 177 to 182 in 0221a25
| print('Calling `intelmqctl upgrade-config` to update/create state file.') | |
| controller = IntelMQController(interactive=False, no_file_logging=True, | |
| drop_privileges=False) | |
| controller.upgrade_conf(state_file=state_file, no_backup=True) | |
| if ownership: | |
| change_owner(STATE_FILE_PATH, owner='intelmq', group='intelmq') |
- it needs to be checked if the file already exists
- if yes: continue with current code
- if not: create the file with the current version as sole entry in
version_history(see link to the example above) and correct file permissions - continue with current code
Metadata
Metadata
Assignees
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behaviorcomponent: coreusability