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

Add --rebuild-gvmd-data command line option #1680

Merged
merged 13 commits into from
Sep 7, 2021

Commits on Sep 3, 2021

  1. Check if config should by synced to a new function

    The function sync_config_with_feed now checks whether a config file
    has to be synced with the new function should_sync_config_from_path.
    
    This will allow a general check if any configs need to be updated
    later.
    timopollmeier committed Sep 3, 2021
    Configuration menu
    Copy the full SHA
    beb48f1 View commit details
    Browse the repository at this point in the history
  2. Move report format and port list sync needed tests

    The test if a sync is necessary for a report format or port list is
    moved to a separate function like it was done for configs.
    timopollmeier committed Sep 3, 2021
    Configuration menu
    Copy the full SHA
    a9da48a View commit details
    Browse the repository at this point in the history

Commits on Sep 6, 2021

  1. Open data object feed dirs in separate functions

    The feed directories for configs, port lists and report formats
    are now opened in a separate function which can later be reused
    for a quick feed status check.
    timopollmeier committed Sep 6, 2021
    Configuration menu
    Copy the full SHA
    7a7cb82 View commit details
    Browse the repository at this point in the history
  2. Make setting user optional when opening feed dirs

    Setting the current user is now optional when opening the feed
    directories for data objects.
    timopollmeier committed Sep 6, 2021
    Configuration menu
    Copy the full SHA
    e41dc4f View commit details
    Browse the repository at this point in the history
  3. Check if data object sync is needed, add feed lock

    Before trying to sync the data objects, check if the feed has any
    updates first.
    Also acquire the feed lock for updating the data objects to avoid
    conflicts with manually triggered updates that are to be added.
    timopollmeier committed Sep 6, 2021
    Configuration menu
    Copy the full SHA
    1a5415c View commit details
    Browse the repository at this point in the history
  4. Return expected failures in sync_..._with_feed ()

    The functions sync_configs_with_feed, sync_port_lists_with_feed and
    sync_report_formats_with_feed will now return postive failure codes
    if the feed directory or owner does not exist or the NVTs are missing
    for configs.
    timopollmeier committed Sep 6, 2021
    Configuration menu
    Copy the full SHA
    260d73e View commit details
    Browse the repository at this point in the history
  5. Adjust try_open_..._feed_dir return codes

    The return codes of the functions try_open_configs_feed_dir,
    try_open_port_lists_feed_dir, try_open_report_formats_feed_dir and
    the corresponding sync_..._with_feed functions now distinguish
    between missing feed directory and missing feed owner.
    timopollmeier committed Sep 6, 2021
    Configuration menu
    Copy the full SHA
    cf4a405 View commit details
    Browse the repository at this point in the history
  6. Allow to skip timestamp checks in data object sync

    The functions for syncing configs, port lists and report formats now
    have a `rebuild` parameter to skip the modification time check to force
    a rebuild.
    timopollmeier committed Sep 6, 2021
    Configuration menu
    Copy the full SHA
    2c0c22c View commit details
    Browse the repository at this point in the history

Commits on Sep 7, 2021

  1. Add option --rebuild-gvmd-data

    This option allows forcing a rebuild of the gvmd data via CLI.
    timopollmeier committed Sep 7, 2021
    Configuration menu
    Copy the full SHA
    8d757d7 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d7a779b View commit details
    Browse the repository at this point in the history
  3. Add missing documentation comments

    Comments for REBUILD_SWITCH and the return values of should_sync_...
    functions were missing.
    timopollmeier committed Sep 7, 2021
    Configuration menu
    Copy the full SHA
    ca00128 View commit details
    Browse the repository at this point in the history
  4. Fix params for static sync_[...]_with_feed headers

    The static headers for the sync_[...]_with_feed functions in the
    manage_sql_[...].c files were missing the rebuild parameter.
    timopollmeier committed Sep 7, 2021
    Configuration menu
    Copy the full SHA
    a898356 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    731851b View commit details
    Browse the repository at this point in the history