linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] systemd generator fails if lvmconfig does not find a value
@ 2018-12-23 18:57 Bastian Blank
  2019-01-03 11:42 ` Peter Rajnoha
  0 siblings, 1 reply; 2+ messages in thread
From: Bastian Blank @ 2018-12-23 18:57 UTC (permalink / raw)
  To: linux-lvm

Moin

The systemd generator in 2.03.01 fails if the config does not yet
contain the variables it tries to read via lvmconfig.  It aborts as
lvmconfig exits with exit value 5.

| % /sbin/lvmconfig config/checks te/t 2>/dev/null; echo $? 
| checks=1
| 5

As generators should not fail, ignoring lvmconfig problems might be the
best option.  The fallback of just generating services is safe.

Regards,
Bastian

-- 
Each kiss is as the first.
		-- Miramanee, Kirk's wife, "The Paradise Syndrome",
		   stardate 4842.6

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [linux-lvm] systemd generator fails if lvmconfig does not find a value
  2018-12-23 18:57 [linux-lvm] systemd generator fails if lvmconfig does not find a value Bastian Blank
@ 2019-01-03 11:42 ` Peter Rajnoha
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Rajnoha @ 2019-01-03 11:42 UTC (permalink / raw)
  To: waldi; +Cc: linux-lvm

On 12/23/18 7:57 PM, Bastian Blank wrote:
> Moin
> 
> The systemd generator in 2.03.01 fails if the config does not yet
> contain the variables it tries to read via lvmconfig.  It aborts as
> lvmconfig exits with exit value 5.
> 
> | % /sbin/lvmconfig config/checks te/t 2>/dev/null; echo $? 
> | checks=1
> | 5
> 
> As generators should not fail, ignoring lvmconfig problems might be the
> best option.  The fallback of just generating services is safe.

We could probably use "lvmconfig --type full" here instead. The "--type
full" will get the actual setting if it exists and if not, it'll take
the default value. And yes, even if that one fails, we should still
generate the services... Thanks for noticing! I'll patch this.

-- 
Peter

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-01-03 11:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-23 18:57 [linux-lvm] systemd generator fails if lvmconfig does not find a value Bastian Blank
2019-01-03 11:42 ` Peter Rajnoha

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).