<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#ffffff" text="#2e3436" link="#2a76c6" vlink="#2e3436">
<div><br>
</div>
<div class="-x-evo-paragraph -x-evo-top-signature-spacer"><br>
</div>
<div>-----Original Message-----</div>
<div><b>From</b>: Eric Jackson <<a href="mailto:Eric%20Jackson%20%3cejackson@suse.com%3e">ejackson@suse.com</a>></div>
<div>Reply-to: Discussions about the DeepSea management framework for Ceph <deepsea-users@lists.suse.com></div>
<div><b>To</b>: deepsea-users@lists.suse.com <<a href="mailto:%22deepsea-users@lists.suse.com%22%20%3cdeepsea-users@lists.suse.com%3e">deepsea-users@lists.suse.com</a>></div>
<div><b>Subject</b>: Re: [Deepsea-users] [ses-users] Failed to reconfigure lrdb</div>
<div><b>Date</b>: Wed, 23 Aug 2017 14:28:29 +0000</div>
<div><br>
</div>
<pre>Hi Sen,

On Wednesday, August 23, 2017 01:49:24 PM Sen Lin wrote:
<blockquote type="cite">
Hi,

Environment: SES5 Milestone10
Failed to transfer iscsi gateway from sesnode04 to sesnode01.
My step:
1. Modify policy.cfg
......
# IGW
role-igw/stack/default/ceph/minions/sesnode01.suse.com.yml
role-igw/cluster/sesnode01.suse.com.sls
......
2. salt-run state.orch ceph.stage.2
3. salt-run state.orch ceph.stage.4 but with error:
...
----------
          ID: iscsi import
</blockquote>

snip

<blockquote type="cite">
                          Name: . /etc/sysconfig/lrbd; lrbd -v $LRBD_OPTIONS
-f /tmp/lrbd.conf Result: False
                       Comment: Command ". /etc/sysconfig/lrbd; lrbd -v
$LRBD_OPTIONS -f /tmp/lrbd.conf" run Started: 21:26:44.948704
default.rgw.buckets.index ERROR: pool 'iscsi-images' does not exist stdout:

                  Summary for sesnode01.suse.com
                  ------------
                  Succeeded: 2 (changed=1)
                  Failed:    1
</blockquote>

Did the iscsi-images pool get created?  Verify with 

rados lspools
<pre>sen: No. In my mind, it should be created at stage.4, right? Why not create automatically?</pre>

<blockquote type="cite">
...

Then I check the file, it still target sesnode04, not sesnode01

sesadmin:/srv/salt/ceph/igw/cache # more lrbd.conf
{"pools": [{"gateways": [{"tpg": [{"image": "demo", "lun": "0"}], "target":
"iqn.2016-11.org.linux-iscsi.igw.x86:sn.demo"}], "pool": "iscsi-images"}],
"portals": [{"name": " portal-sesnode04-1", "addresses":
["192.168.101.14"]}], "targets": [{"hosts": [{"host": "sesnode04",
"portal": "portal-sesnode04-1"}], "target": "iqn.2016-11.org.linux-iscsi
.igw.x86:sn.demo"}], "auth": [{"authentication": "none", "target":
"iqn.2016-11.org.linux-iscsi.igw.x86:sn.demo"}]}


My question:
1. Why the lrbd.conf still point to sesnode04? Why not clear it with stage.2
and stage.4? 2. Any special steps needed to clear the info saved before?
</blockquote>

What does 

salt-run select.minions cluster=ceph roles=igw host=True

return?  This command is executed to fill in the template in 
.../ceph/igw/files/lrbd.conf.j2.    If that returns sesnode01, then run

salt 'admin.ceph' state.apply ceph.igw.config

and verify that the .../ceph/igw/cache/lrbd.conf is correct.

That is the first step in the orchestration (see 
/srv/salt/ceph/stage/iscsi/default.sls).  If this is still wrong, then we need 
to investigate further.</pre>
<pre><br></pre>
<pre>sen: I have fixed this issue manually, but I suspect the mechanism is not working well. So I do another test. Can you help me to analyze?</pre>
<pre>I tried to move igw from sesnode01 to sesnode02.</pre>
<pre><br></pre>
<pre>(1)sesadmin:/srv/pillar/ceph/proposals # more policy.cfg</pre>
<pre>...</pre>
<pre># IGW</pre>
<pre>role-igw/stack/default/ceph/minions/<font color="#f11515">sesnode02</font>.suse.com.yml</pre>
<pre>role-igw/cluster/<font color="#f11515">sesnode02</font>.suse.com.sls</pre>
<pre>...</pre>
<pre><br></pre>
<pre>(2) run stage.2 successfully</pre>
<pre><br></pre>
<pre>(3)</pre>
<pre>sesadmin:/srv/pillar/ceph/proposals # salt-run select.minions cluster=ceph roles=igw host=True</pre>
<pre>- <font color="#ff2600">sesnode02</font></pre>
<pre><font color="#ff2600"><br></font></pre>
<pre>(4)</pre>
<pre>sesadmin:/srv/pillar/ceph/proposals # salt 'admin.ceph' state.apply ceph.igw.config</pre>
<pre>No minions matched the target. No command was sent, no jid was assigned.</pre>
<pre>ERROR: No return received</pre>
<pre><br></pre>
<pre>sesadmin:/srv/pillar/ceph/proposals # salt 'sesnode02.suse.com' state.apply ceph.igw.config</pre>
<pre>sesnode02.suse.com:</pre>
<pre>  Name: igw configured by gui - Function: test.nop - Result: Clean Started: - 09:34:58.706790 Duration: 0.578 ms</pre>
<pre><br></pre>
<pre>Summary for sesnode02.suse.com</pre>
<pre>------------</pre>
<pre>Succeeded: 1</pre>
<pre>Failed:    0</pre>
<pre>------------</pre>
<pre>Total states run:     1</pre>
<pre>Total run time:   0.578 ms</pre>
<pre><br></pre>
<pre>(5) But in this file lrbd.conf, it still point to sesnode01</pre>
<pre>sesadmin:/srv/salt/ceph/igw/cache # more lrbd.conf </pre>
<pre>{"pools": [{"gateways": [{"tpg": [{"image": "demo", "lun": "0"}], "target": "iqn.2016-11.org.linux-iscsi.igw.x86:sn.demo"}], "pool": "iscsi-images"}], "portals": [{"name": "</pre>
<pre>portal-sesnode01.suse.com-1", "addresses": ["192.168.101.11"]}], "targets": [{"hosts": [{"host": "<font color="#f11515">sesnode01.suse.com</font>", "portal": "portal-sesnode01.suse.com-1"}], "target": "</pre>
<pre>iqn.2016-11.org.linux-iscsi.igw.x86:sn.demo"}], "auth": [{"authentication": "none", "target": "iqn.2016-11.org.linux-iscsi.igw.x86:sn.demo"}]}</pre>
<pre><br></pre>
<pre><br></pre>
<pre>Eric
<blockquote type="cite">


BR/Sen
</blockquote></pre>
</body>
</html>