Project

Profile

Help

Issue #425

Got an error instead of empty list when listing scheduled content <action>

Added by ipanova@redhat.com over 6 years ago. Updated over 2 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
1. Low
Version:
Platform Release:
2.7.0
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

Description of problem:
Got an error instead of empty list when listing scheduled content install/update/uninstall

[root@ip-10-75-19-113 ~]# pulp-admin -u admin -p admin rpm consumer package install schedules list --consumer-id c1
----------------------------------------------------------------------
Schedules
--------------------------------------------------------------------

The following resource(s) could not be found:

None (schedule)

from /root/.pulp/server_calls.log:

2014-05-06 08:01:38,983 - INFO - GET request to /pulp/api/v2/consumers/c1/schedules/content/install/ with parameters None
2014-05-06 08:01:38,984 - INFO - Response status : 404

2014-05-06 08:01:38,984 - INFO - Response body :
{
"exception": null,
"traceback": null,
"_href": "/pulp/api/v2/consumers/c1/schedules/content/install/",
"error_message": "Missing resource(s): schedule=None",
"http_request_method": "GET",
"http_status": 404,
"error": {
"code": "PLP0009",
"data": {
"resources": {
"schedule": null
}
},
"description": "Missing resource(s): schedule=None",
"sub_errors": []
},
"resources": {
"schedule": null
}
}

[root@ip-10-75-19-113 ~]# pulp-admin -u admin -p admin rpm consumer package install schedules create --schedule PT1M --consumer-id c1 --name wolf
Schedule successfully created

[root@ip-10-75-19-113 ~]# pulp-admin -u admin -p admin rpm consumer package install schedules list --consumer-id c1
----------------------------------------------------------------------
Schedules
--------------------------------------------------------------------

Schedule: PT1M
Id: 536896064fb9b50229bf5f10
Enabled: True
Next Run: 2014-05-06T07:58:04Z

[root@ip-10-75-19-113 ~]# pulp-admin -u admin -p admin rpm consumer package install schedules delete --schedule-id 536896064fb9b50229bf5f10 --consumer-id c1
Schedule successfully deleted

[root@ip-10-75-19-113 ~]# pulp-admin -u admin -p admin rpm consumer package install schedules list --consumer-id c1
----------------------------------------------------------------------
Schedules
--------------------------------------------------------------------

The following resource(s) could not be found:

None (schedule)

Version-Release number of selected component (if applicable):
pulp-2.4.0-0.11.beta

How reproducible:

Steps to Reproduce:
1.
2.
3.

Actual results:

Expected results:

Additional info:

Same issue with API
http://pulp-dev-guide.readthedocs.org/en/latest/integration/rest-api/consumer/scheduled_content.html#scheduled-content-management

$ curl H "Accept: application/json" -X GET -k -u admin:admin 'https://example.com/pulp/api/v2/consumers/c1/schedules/content/install/'| python -m json.tool
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 385 100 385 0 0 364 0 0:00:01 0:00:01 -
:--:-- 417
{
"_href": "/pulp/api/v2/consumers/c1/schedules/content/install/",
"error": {
"code": "PLP0009",
"data": {
"resources": {
"schedule": null
}
},
"description": "Missing resource(s): schedule=None",
"sub_errors": []
},
"error_message": "Missing resource(s): schedule=None",
"exception": null,
"http_request_method": "GET",
"http_status": 404,
"resources": {
"schedule": null
},
"traceback": null
}

+ This bug was cloned from Bugzilla Bug #1094634 +

History

#1 Updated by ipanova@redhat.com over 6 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to ipanova@redhat.com

#2 Updated by ipanova@redhat.com over 6 years ago

  • Status changed from ASSIGNED to POST
  • Severity set to Low

#3 Updated by bmbouter over 6 years ago

  • Severity changed from Low to 1. Low

#4 Updated by ipanova@redhat.com over 6 years ago

  • Status changed from POST to MODIFIED

#5 Updated by dkliban@redhat.com over 6 years ago

  • Platform Release set to 2.7.0

#6 Updated by dkliban@redhat.com over 6 years ago

  • Status changed from MODIFIED to 5

#7 Updated by igulina@redhat.com over 6 years ago

  • Status changed from 5 to 6
 
>> rpm -qa pulp-server
pulp-server-2.7.0-0.3.beta.el7.noarch

 pulp-admin -u admin -p admin rpm consumer package install schedules list --consumer-id gosha
+----------------------------------------------------------------------+
                               Schedules
+----------------------------------------------------------------------+

There are no schedules defined for this operation.

>> pulp-admin -u admin -p admin rpm consumer package install schedules create --schedule PT1M --consumer-id gosha --name babarashka
Schedule successfully created

>> pulp-admin -u admin -p admin rpm consumer package install schedules list --consumer-id gosha --details
+----------------------------------------------------------------------+
                               Schedules
+----------------------------------------------------------------------+

Schedule:             PT1M
Id:                   558d6b7de512ed777daefd1e
Enabled:              True
Remaining Runs:       N/A
Consecutive Failures: 0
Failure Threshold:    None
First Run:            2015-06-26T15:10:53Z
Next Run:             2015-06-26T15:12:53Z

>> pulp-admin -u admin -p admin rpm consumer package install schedules delete --schedule-id 558d6b7de512ed777daefd1e --consumer-id gosha
Schedule successfully deleted

>> pulp-admin -u admin -p admin rpm consumer package install schedules list --consumer-id gosha
+----------------------------------------------------------------------+
                               Schedules
+----------------------------------------------------------------------+

There are no schedules defined for this operation.
>>

API

>> curl H "Accept: application/json" -X GET -k -u admin:admin 'https://localhost/pulp/api/v2/consumers/gosha/schedules/content/install/'
curl: (6) Could not resolve host: H; Name or service not known
curl: (6) Could not resolve host: Accept; Name or service not known
[]

#8 Updated by amacdona@redhat.com almost 6 years ago

  • Status changed from 6 to CLOSED - CURRENTRELEASE

#10 Updated by bmbouter over 2 years ago

  • Tags Pulp 2 added

Please register to edit this issue

Also available in: Atom PDF