Bug #23958
closed[API] Template import from local directory is throwing directory not found error
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1575975
Description of problem:
The import from local directory through API calls isnt functinal, its throwing directory not found error as following :
---------------------------------------------------
"message":"Something went wrong during export: Using file-based synchronization, but couldn't find /tmp/now"}
---------------------------------------------------
Here '/tmp/now' folder is created and with right permissions still the issue is misleading.
Version-Release number of selected component (if applicable):
Satellite 6.4.0 snap 2
How reproducible:
Always
1. Create a local directory in satellite with foreman owner and correct SELinux policy
2. Create template erb file in that directory
3. Set that directory as 'Repo' in settings
4. Attempt to import above template from API end:
- curl -H "Accept: application/json" -H "Content-Type: application/json" -k -X POST -u admin:passwd https://mysatellite.com/api/v2/templates/export -d '{"verbose": "true", "associate": "new"}'
Actual results: {"message":"Something went wrong during export: Using file-based synchronization, but couldn't find /tmp/now"}
Expected results:
The template should be imported.
Additional info:
Updated by The Foreman Bot over 6 years ago
- Status changed from New to Ready For Testing
- Assignee set to Ondřej Pražák
- Pull request https://github.com/theforeman/foreman_templates/pull/96 added
Updated by Marek Hulán over 6 years ago
- Subject changed from [API] Template import from local directory is throwing directory not found error to [API] Template import from local directory is throwing directory not found error
- Translation missing: en.field_release set to 368
Updated by Anonymous over 6 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset foreman_templates|e194263b96b25db918df90891766d11f73f7f193.