command 'freezer action-create --file' can create action with invalid file

Bug #1677188 reported by jiaopengju
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Backup/Restore and DR (Freezer)
Fix Released
Undecided
jiaopengju

Bug Description

First, I create a file named action-backup-vol with contents as below:

{
  "action" : "backup",
  "mode": "cinder",
  "cinder-vol-id" : "8f00b5c5-e817-4b29-b0de-4c07f75208a5",
  "container" : "volumebackupcontainer",
  "backup_name" : "project_mayhem_backup"
}

freezer action-create --file action-backup-vol

It shows I have created the action correctly.
But when I use freezer action-list to list the actions I have created, it will show default values but not the real value.

I think we should add a json validation before create action in freezer-api.

jiaopengju (pj-jiao)
Changed in freezer:
assignee: nobody → jiaopengju (pj-jiao)
jiaopengju (pj-jiao)
Changed in freezer:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to freezer-api (master)

Reviewed: https://review.openstack.org/451648
Committed: https://git.openstack.org/cgit/openstack/freezer-api/commit/?id=8c99dcefb73b13c524b0cc67697eed56363c81c2
Submitter: Jenkins
Branch: master

commit 8c99dcefb73b13c524b0cc67697eed56363c81c2
Author: Pengju Jiao <email address hidden>
Date: Thu Mar 30 12:57:52 2017 +0800

    Add 'freezer_action' to action schema

    Currently we can create a new action with invalid
    action file that has no 'freezer_action' option
    correctly, but when we get the action info with
    'freezer action-list', it will show the default
    and invalid values. So this patch add 'freezer-action'
    to the json validation.

    Depends-On: I45c419852b177e1d1b067bb5b7f25a60c6c88f7f
    Change-Id: Id4619ae625865df585dfadb0761f711f702aa1ab
    Closes-Bug: #1677188

Changed in freezer:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/freezer-api 5.0.0.0b2

This issue was fixed in the openstack/freezer-api 5.0.0.0b2 development milestone.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.