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

[Question] About confirmation of "resource-agents-deps.target" at the start of LVM-activate resource. #1647

Closed
HideoYamauchi opened this issue May 12, 2021 · 6 comments · Fixed by #1652

Comments

@HideoYamauchi
Copy link
Contributor

Hi All,

The LVM-activate resource makes the decision to create 99-LVM-activate.conf at start.
But isn't it correct to perform this check with "resource-agents-deps.target" instead of "resource-agents-deps.target.d"?

(snip)
lvm_start() {
        if systemd_is_running ; then
        	# Create drop-in to deactivate VG before stopping
		# storage services during shutdown/reboot.
		after=$(systemctl show resource-agents-deps.target.d \
			--property=After | cut -d'=' -f2)

		case "$after" in
			*" blk-availability.service "*)
				;;
			*)
				systemd_drop_in "99-LVM-activate" "After" \
					"blk-availability.service"
				;;
		esac
(snip)

After actually generating 99-LVM-activate.conf, the result is as follows.

If you specify "resource-agents-deps.target.d", blk-availability.service is not checked.

# systemctl show resource-agents-deps.target.d --property=After | cut -d'=' -f2


If you specify "resource-agents-deps.target", blk-availability.service is checked.

# systemctl show resource-agents-deps.target --property=After | cut -d'=' -f2
blk-availability.service

Best Regards,
Hideo Yamauchi.

@oalbrigt
Copy link
Contributor

Nice catch. I'll do some testing next week and make a patch.

@HideoYamauchi
Copy link
Contributor Author

Hi Oyvind,

Okay!
I will wait for your fix.

Many thanks,
Hideo Yamauchi.

@oalbrigt
Copy link
Contributor

You are correct, so I'll make a patch to fix this.

Thank you for reporting it.

@HideoYamauchi
Copy link
Contributor Author

Hi Oyvind,

All right!

Many thanks,
Hideo Yamauchi.

@nrwahl2
Copy link
Contributor

nrwahl2 commented Jun 15, 2021

Thanks @HideoYamauchi. My original patch with the typos ended up causing a really weird issue with nfsserver resources. I'm not sure how. But the fix proposed here resolves it.

@HideoYamauchi
Copy link
Contributor Author

Hi Reid,

Thanks @HideoYamauchi. My original patch with the typos ended up causing a really weird issue with nfsserver resources. I'm not sure how. But the fix proposed here resolves it.

Okay!
Thank you for your information.

Many Thnaks.
Hideo Yamauchi.

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