Bug 1355762 - ceph_stable_rh_storage_iso_path should not be created as directory
Summary: ceph_stable_rh_storage_iso_path should not be created as directory
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Storage Console
Classification: Red Hat Storage
Component: ceph-ansible
Version: 2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 2
Assignee: Alfredo Deza
QA Contact: Martin Kudlej
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-07-12 12:58 UTC by Martin Kudlej
Modified: 2016-08-23 19:56 UTC (History)
9 users (show)

Fixed In Version: ceph-ansible-1.0.5-26.el7scon
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-08-23 19:56:41 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1338551 0 unspecified CLOSED [ceph-ansible]: Installation via ISO fails on RHEL cluster saying Destination Directory does not exist 2021-02-22 00:41:40 UTC
Red Hat Product Errata RHEA-2016:1754 0 normal SHIPPED_LIVE New packages: Red Hat Storage Console 2.0 2017-04-18 19:09:06 UTC

Internal Links: 1338551

Description Martin Kudlej 2016-07-12 12:58:32 UTC
Description of problem:
I have set in "all":
ceph_stable_rh_storage_iso_install: true # usually used when nodes don't have access to cdn.redhat.com
ceph_stable_rh_storage_iso_path: /root/Ceph-2.0-RHEL-7-20160708.1-x86_64-dvd.iso <-iso stored on ansible machine and I expect that path also on all nodes
ceph_stable_rh_storage_mount_path: /root/iso <-mount point on nodes

and I've seen:
msg: Error mounting /root/iso: mount: /root/Ceph-2.0-RHEL-7-20160708.1-x86_64-dvd.iso: failed to      setup loop device: No such device or address

According logs Ansible has copied ISO to /root/Ceph-2.0-RHEL-7-20160708.1-x86_64-dvd.iso/Ceph-2.0-RHEL-7-20160708.1-x86_64-dvd.iso
and then mount /root/Ceph-2.0-RHEL-7-20160708.1-x86_64-dvd.iso to /root/iso which is not possible because /root/Ceph-2.0-RHEL-7-20160708.1-x86_64-dvd.iso is directory.

I've fixed this issue by changing /usr/share/ceph-ansible/roles/ceph-common/tasks/pre_requisites/prerequisite_rh_storage_iso_install.yml to:
---
- name: create red hat storage package directories
  file:
    path: "{{ item }}"
    state: directory
  with_items: <- removed creating of directory /root/Ceph-2.0-RHEL-7-20160708.1-x86_64-dvd.iso
    - "{{ ceph_stable_rh_storage_mount_path }}"
    - "{{ ceph_stable_rh_storage_repository_path }}"

- name: fetch the red hat storage iso from the ansible server
  copy:
    src: "{{ ceph_stable_rh_storage_iso_path }}"
    dest: "/root" <- fetch /root/Ceph-2.0-RHEL-7-20160708.1-x86_64-dvd.iso from Ansible server to /root on nodes

What I see is that there should be new variable for path to ISO on Ansible server or new variable for destination for ISO on nodes.



Version-Release number of selected component (if applicable):
ceph-ansible-1.0.5-25.el7scon.noarch

How reproducible:
100%

Comment 2 Alfredo Deza 2016-07-12 13:34:26 UTC
I think this is related to https://bugzilla.redhat.com/show_bug.cgi?id=1338551

Your suggestion of adding a new variable to fix this properly sounds like the right approach.

Comment 3 Alfredo Deza 2016-07-12 14:09:17 UTC
Pull request created: https://github.com/ceph/ceph-ansible/pull/881

It will not require a new variable to be set, it will detect the path up to the directory of the iso and create it if it doesn't exist.

Comment 4 Ken Dreyer (Red Hat) 2016-07-12 21:11:02 UTC
PR merged upstream; just need to cherry-pick downstream.

Comment 10 Martin Kudlej 2016-08-09 11:27:41 UTC
Tested with
ceph-ansible-1.0.5-32.el7scon.noarch
and it's OK.

Comment 12 errata-xmlrpc 2016-08-23 19:56:41 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2016:1754


Note You need to log in before you can comment on or make changes to this bug.