Skip to content
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

/etc/tcmu/tcmu.conf file not installed after make install #320

Closed
vatelzh opened this issue Oct 24, 2017 · 4 comments
Closed

/etc/tcmu/tcmu.conf file not installed after make install #320

vatelzh opened this issue Oct 24, 2017 · 4 comments

Comments

@vatelzh
Copy link

vatelzh commented Oct 24, 2017

I built tcmu on CentOS7.2 and the kernel is 4.13.9-1.el7, everything is ok except /opt/tcmu/etc/tcmu/tcmu.conf is not installed, my steps and output:

    git clone git@github.com:open-iscsi/tcmu-runner.git
    cp tcmu-runner -fr tcmu-runner-build
    cd tcmu-runner-build/
    cmake -DSUPPORT_SYSTEMD=ON -DCMAKE_INSTALL_PREFIX=/usr -Dwith-glfs=false .
    make install DESTDIR=/opt/tcmu

[ 3%] Generating tcmuhandler-generated.c, tcmuhandler-generated.h
Scanning dependencies of target tcmu
[ 6%] Building C object CMakeFiles/tcmu.dir/configfs.c.o
[ 9%] Building C object CMakeFiles/tcmu.dir/api.c.o
[ 12%] Building C object CMakeFiles/tcmu.dir/libtcmu.c.o
[ 15%] Building C object CMakeFiles/tcmu.dir/libtcmu-register.c.o
[ 18%] Building C object CMakeFiles/tcmu.dir/tcmuhandler-generated.c.o
[ 21%] Building C object CMakeFiles/tcmu.dir/libtcmu_log.c.o
[ 25%] Building C object CMakeFiles/tcmu.dir/libtcmu_config.c.o
[ 28%] Building C object CMakeFiles/tcmu.dir/libtcmu_time.c.o
Linking C shared library libtcmu.so
[ 28%] Built target tcmu
Scanning dependencies of target consumer
[ 31%] Building C object CMakeFiles/consumer.dir/consumer.c.o
Linking C executable consumer
[ 31%] Built target consumer
Scanning dependencies of target handler_file
[ 34%] Building C object CMakeFiles/handler_file.dir/file_example.c.o
Linking C shared library handler_file.so
[ 34%] Built target handler_file
Scanning dependencies of target handler_file_optical
[ 37%] Building C object CMakeFiles/handler_file_optical.dir/file_optical.c.o
Linking C shared library handler_file_optical.so
[ 37%] Built target handler_file_optical
Scanning dependencies of target handler_file_zbc
[ 40%] Building C object CMakeFiles/handler_file_zbc.dir/file_zbc.c.o
Linking C shared library handler_file_zbc.so
[ 40%] Built target handler_file_zbc
Scanning dependencies of target handler_qcow
[ 43%] Building C object CMakeFiles/handler_qcow.dir/qcow.c.o
Linking C shared library handler_qcow.so
[ 43%] Built target handler_qcow
Scanning dependencies of target handler_rbd
[ 46%] Building C object CMakeFiles/handler_rbd.dir/rbd.c.o
Linking C shared library handler_rbd.so
[ 46%] Built target handler_rbd
Scanning dependencies of target tcmu-runner
[ 50%] Building C object CMakeFiles/tcmu-runner.dir/tcmur_cmd_handler.c.o
[ 53%] Building C object CMakeFiles/tcmu-runner.dir/tcmur_aio.c.o
[ 56%] Building C object CMakeFiles/tcmu-runner.dir/tcmur_device.c.o
[ 59%] Building C object CMakeFiles/tcmu-runner.dir/target.c.o
[ 62%] Building C object CMakeFiles/tcmu-runner.dir/alua.c.o
[ 65%] Building C object CMakeFiles/tcmu-runner.dir/main.c.o
[ 68%] Building C object CMakeFiles/tcmu-runner.dir/tcmuhandler-generated.c.o
Linking C executable tcmu-runner
[ 71%] Built target tcmu-runner
Scanning dependencies of target tcmu-synthesizer
[ 75%] Building C object CMakeFiles/tcmu-synthesizer.dir/tcmu-synthesizer.c.o
Linking C executable tcmu-synthesizer
[ 75%] Built target tcmu-synthesizer
Scanning dependencies of target tcmu_static
[ 78%] Building C object CMakeFiles/tcmu_static.dir/configfs.c.o
[ 81%] Building C object CMakeFiles/tcmu_static.dir/api.c.o
[ 84%] Building C object CMakeFiles/tcmu_static.dir/libtcmu.c.o
[ 87%] Building C object CMakeFiles/tcmu_static.dir/libtcmu-register.c.o
[ 90%] Building C object CMakeFiles/tcmu_static.dir/tcmuhandler-generated.c.o
[ 93%] Building C object CMakeFiles/tcmu_static.dir/libtcmu_log.c.o
[ 96%] Building C object CMakeFiles/tcmu_static.dir/libtcmu_config.c.o
Linking C static library libtcmu_static.a
[100%] Built target tcmu_static
Install the project...
-- Install configuration: ""
-- Installing: /opt/tcmu/usr/local/lib64/libtcmu.so.2
-- Installing: /opt/tcmu/usr/local/lib64/libtcmu.so
-- Installing: /opt/tcmu/usr/local/bin/tcmu-runner
-- Removed runtime path from "/opt/tcmu/usr/local/bin/tcmu-runner"
-- Installing: /opt/tcmu/usr/local/lib64/tcmu-runner/handler_rbd.so
-- Installing: /opt/tcmu/usr/local/lib64/tcmu-runner/handler_qcow.so
-- Installing: /opt/tcmu/usr/share/dbus-1/system-services/org.kernel.TCMUService1.service
-- Installing: /opt/tcmu/etc/dbus-1/system.d/tcmu-runner.conf
-- Installing: /opt/tcmu/usr/lib/systemd/system/tcmu-runner.service
-- Installing: /opt/tcmu/usr/local/share/man/man8/tcmu-runner.8

@vatelzh
Copy link
Author

vatelzh commented Oct 24, 2017

Check the code, and I guess the problem is hard code in tcmu.conf_install.cmake.in

if (NOT EXISTS "/etc/tcmu/tcmu.conf")
	file(INSTALL "${PROJECT_SOURCE_DIR}/tcmu.conf" DESTINATION "/etc/tcmu")
endif()

Do we need to check if file exists?

@vatelzh vatelzh closed this as completed Oct 24, 2017
@vatelzh
Copy link
Author

vatelzh commented Oct 24, 2017

@mikechristie what are the consequences, if overwrite tcmu.conf ?

@lxbsz
Copy link
Collaborator

lxbsz commented Oct 24, 2017

If we overwrite the exsited tcmu.conf, we may overwrite the old settings. For many cases we'd like to keep the old configureation.

@vatelzh
Copy link
Author

vatelzh commented Oct 24, 2017

@lxbsz Got it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants