Bug 1449614 - tcmu-runner fails to run in a container.
Summary: tcmu-runner fails to run in a container.
Keywords:
Status: CLOSED DUPLICATE of bug 1449690
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: rhgs-server-container
Version: cns-3.5
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Mohamed Ashiq
QA Contact: Anoop
URL:
Whiteboard:
Depends On:
Blocks: 1449690
TreeView+ depends on / blocked
 
Reported: 2017-05-10 11:20 UTC by Humble Chirammal
Modified: 2017-07-11 07:51 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1449690 (view as bug list)
Environment:
Last Closed: 2017-07-11 07:51:25 UTC
Embargoed:


Attachments (Terms of Use)

Description Humble Chirammal 2017-05-10 11:20:57 UTC
Description of problem:

tcmu-runner fails to run in a container as it try to load the dependent kernel modules in its main() and fails. Loading kernel modules from container is not a valid thing to perform. tcmu-runner need to check for the availability of the depended modules first ( so that it can be listed as prereq) so that if those are loaded, it can run successfully from the container. 

main.c:

tcmu_dbg("handler path: %s\n", handler_path);

	ret = load_our_module();
	if (ret < 0) {
		tcmu_err("couldn't load module\n");
		exit(1);
	}


int load_our_module(void) {



	err = kmod_module_new_from_lookup(ctx, "target_core_user", &list);
...
	kmod_list_foreach(itr, list) {
		struct kmod_module *mod = kmod_module_get_module(itr);

		err = kmod_module_probe_insert_module (
			mod, KMOD_PROBE_APPLY_BLACKLIST, 0, 0, 0, 0);

		if (err != 0) {
			tcmu_err("kmod_module_probe_insert_module() for %s failed\n",
			    kmod_module_get_name(mod));
			return -1;
		}

		tcmu_dbg("Module %s inserted (or already loaded)\n", kmod_module_get_name(mod));

		kmod_module_unref(mod);
}

Version-Release number of selected component (if applicable):


How reproducible:

Run tcmu-runner from a container.

Comment 2 Mohamed Ashiq 2017-07-11 07:51:25 UTC
Tcmu-runner is working inside the container and is verified in #1449690.

*** This bug has been marked as a duplicate of bug 1449690 ***


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