New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
igw add support for ceph-iscsi package #3977
Conversation
|
Hey @guits I have never seen the web based suggested fix and commit interface before. I clicked the button to add the suggested commits. Do you prefer I do that on the web interface, or that I redo my patches and then re-push them? |
|
@mikechristie indeed, the "suggested fix" feature from github looks nice at first glance but it end up with 1 commit by suggested change which is not that nice in the end 😄 |
|
No problem guits. Repushed with your requested changes. Thanks. |
|
@mikechristie looks like there's some valid failures : |
|
Hey, 2 questions. How can I see the iscsigws.yml being used for the tests that failed? Or, how do I see/modify a test like: https://2.jenkins.ceph.com/job/ceph-ansible-prs-dev-centos-container-all_daemons/14/consoleText They are not in ceph-ansible/tests right? For the container cases, before my patches we currently ignore the iscsi variables like gateway_iqn, gateway_ip_list, etc if they are set in iscsigws.yml. Was that a mistake? Do we want to continue that behavior, or do you prefer we fail the task and warn the user those values are not supported when this is detected? |
|
Just adding myself a note. The current test failures like this: were due to me breaking the ceph-iscsi build, so it is not on the shamen repos right now. It will be fixed here: |
|
@mikechristie I think we are almost good, could you resolve the conflicting file please so we can trigger the CI? Thanks! |
|
In this repush, I fixed the test file conflict and I also fixed the warnings: [WARNING]: conditional statements should not include jinja2 templating |
|
looks like there is a valid failure: |
|
Ignore the repush I did today. It is going to fail. It is going to need this fix to pass. I will ping you when we are ready on the ceph-iscsi side. |
|
@mikechristie we merged ceph/ceph-container#1393 last week but we're wondering if we should have wait this PR to be merged before merging the changes in ceph-container. any thought ? |
|
How does ceph-container bring in package dependencies? Does it depend on yum/rpm handling it or do you have to add some explicit call/code? The failure is probably the same as the one we are still hitting in this PR
E assert False and requires the patch in this ceph-iscsi PR: (this patch was just merged today) which is just fixing up the spec to bring in pyOpenSSL/python-pyOpenSSL. Without that patch rbd-target-api was failing to start on the tests because it was trying to do a "import ssl" and the package was not installed. |
ceph-container uses rpm/yum commands so it should install all required dependencies.
We have rebuild the ceph container image this morning and we have now |
|
Just FYI. It looks like there is another bug with rbd-target-gw too. |
Ok. This is fixed in this ceph-iscsi PR: |
@pytest.mark.parametrize('svc', [
'rbd-target-api',
'rbd-target-gw',
'tcmu-runner'
])
def test_iscsi_service_enabled_and_running(self, node, host, svc):
s = host.service(svc)
assert s.is_enabled
> assert s.is_running
E assert False
E + where False = <service rbd-target-api>.is_runningI tried to debug this and there's some changes on the logging side for api/gw. So it's failing because the Jun 10 19:21:17 iscsi-gw0 docker[6908]: exec: PID 101: spawning /usr/bin/rbd-target-gw
Jun 10 19:21:17 iscsi-gw0 docker[6908]: exec: Waiting 101 to quit
Jun 10 19:21:17 iscsi-gw0 docker[6908]: Traceback (most recent call last):
Jun 10 19:21:17 iscsi-gw0 docker[6908]: File "/usr/bin/rbd-target-gw", line 81, in <module>
Jun 10 19:21:17 iscsi-gw0 docker[6908]: backupCount=7)
Jun 10 19:21:17 iscsi-gw0 docker[6908]: File "/usr/lib64/python2.7/logging/handlers.py", line 117, in __init__
Jun 10 19:21:17 iscsi-gw0 docker[6908]: BaseRotatingHandler.__init__(self, filename, mode, encoding, delay)
Jun 10 19:21:17 iscsi-gw0 docker[6908]: File "/usr/lib64/python2.7/logging/handlers.py", line 64, in __init__
Jun 10 19:21:17 iscsi-gw0 docker[6908]: logging.FileHandler.__init__(self, filename, mode, encoding, delay)
Jun 10 19:21:17 iscsi-gw0 docker[6908]: File "/usr/lib64/python2.7/logging/__init__.py", line 902, in __init__
Jun 10 19:21:17 iscsi-gw0 docker[6908]: StreamHandler.__init__(self, self._open())
Jun 10 19:21:17 iscsi-gw0 docker[6908]: File "/usr/lib64/python2.7/logging/__init__.py", line 925, in _open
Jun 10 19:21:17 iscsi-gw0 docker[6908]: stream = open(self.baseFilename, self.mode)
Jun 10 19:21:17 iscsi-gw0 docker[6908]: IOError: [Errno 2] No such file or directory: '/var/log/rbd-target-gw/rbd-target-gw.log'I don't think it was true for ceph-iscsi 2.x. For 3.x we probably need to create the directories on the host and bind mount them into the container (to avoid to do the logging in the container). @guits thoughts ? Finally I didn't see any changes in the
[1] https://github.com/ceph/ceph-iscsi-config/blob/master/rbd-target-gw.py#L412 |
|
We have merged the necessary ceph-iscsi patches to upstream so all non-container tests are now passing. I am not sure what the GH command is to restart the tests in this PR. The /var/log/rbd-target-* dir issue is a little messy, but maybe we do not need to support everything?
However, there were shaman builds with it added because it is tracking upstream commit.s
For iscsi-gateway.cfg, here are the changes:
Here is a list of the iscsi-gateway.cfg settings in 3.0: [config] [target] |
|
what is the status of this PR ? |
|
I think guits is waiting on the tests passing. I am having issues making them pass on GH, but though (sometimes a tests works and sometimes it doesn't). Locally they run ok for me. I sent a mail to guits with some details about the issue. Will update the PR when I figure out if it is a bug in my code or the test setup. |
|
jenkins test pipeline |
|
jenkins test pipeline |
The ceph-iscsi-config and ceph-iscsi-cli packages were combined into ceph-iscsi and its APIs changed. This fixes up the iscsi purge task to support the new API and old one. Signed-off-by: Mike Christie <mchristi@redhat.com>
Signed-off-by: Mike Christie <mchristi@redhat.com>
The gateway_ip_list is not used in container setups, so drop it for that case. Signed-off-by: Mike Christie <mchristi@redhat.com>
This adds support for the ceph-iscsi package during install. ceph-iscsi does not support setting up targets/gws, luns and clients with the current library/igw_* code. Going forward those tasks should be done with gwcli or dashboard. ceph-iscsi will only be used if the user has no iscsi objects setup so we do not break existing setups. The next patch will update the iscsigws.yml.sample to document that users must not setup any iscsi object if they want to use the new package and tools. Signed-off-by: Mike Christie <mchristi@redhat.com>
Update iscsigws.yml.sample to document that we cannot use ansible to setup iSCSI objects and use the new ceph-iscsi package. Signed-off-by: Mike Christie <mchristi@redhat.com>
gateway_ip_list is depreciated and is only used when using the old ceph-iscsi-config/cli packages that are no longer being developed (GH repos are archived). Because ceph-iscsi-config/cli is no longer being worked on, this modifies the tests to stress the ceph-iscsi based installs. Signed-off-by: Mike Christie <mchristi@redhat.com>
If the user has manually installed ceph-iscsi but is trying to setup a iscsi object in iscsigws.yml you will just a python crash. This patch adds a check and more user friendly error message for the case. Signed-off-by: Mike Christie <mchristi@redhat.com>
If the user is still using the older packages and does not setup the target iqn you will just get a vague error message later on. This adds a check during the validate task, so it is clear to the user. Signed-off-by: Mike Christie <mchristi@redhat.com>
This commit moves some old variables into ceph-defaults so we can move the `use_new_ceph_iscsi` fact in ceph-facts role in order. Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
|
jenkins test pipeline |
3 similar comments
|
jenkins test pipeline |
|
jenkins test pipeline |
|
jenkins test pipeline |
The ceph-iscsi-config and ceph-iscsi-cli packages were merged into ceph-iscsi, and the ceph-iscsi-config API was completely changed, but the ceph-ansible iscsi code/tasks will try to use ceph-iscsi with the old API calls and crash.
For older setups that are still using ceph-iscsi-config/cli we will still allow iscsigws.yml to define iscsi objects, but to handle this issue for new and updated installs using ceph-iscsi, this patchset syncs the non-container setup to work like container based setup where ansible is only used to setup the daemons and install rpms. gwcli or dashboard will then be used to setup the iscsi objects like the target, LUNs and clients.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1709518
Resolves: #3870