Project

General

Profile

Actions

Bug #23958

closed

[API] Template import from local directory is throwing directory not found error

Added by Marek Hulán over 6 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

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

Steps to Reproduce:
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:
  1. 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:

Actions

Also available in: Atom PDF