Project

General

Profile

Actions

Bug #23958

closed

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

Added by Marek Hulán almost 6 years ago. Updated almost 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 #1

Updated by The Foreman Bot almost 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
Actions #2

Updated by Marek Hulán almost 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
Actions #3

Updated by Anonymous almost 6 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF