Re: krpc: unbootable ZFS-on-root after major upgrade to 11.2

2018-10-22 Thread Eugene Grosbein
22.10.2018 21:35, Glen Barber wrote:

>> This is just a typical foot-shooting (and a shortcoming of the kernel build
>> system that allows such foot-shooting to happen).
>> I think that there can be other ways in which you can specify inconsistent
>> kernel options and/or an incorrect subset of modules in MODULES_OVERRIDE to
>> create missing dependencies for critical modules.
>> Do we want to issue an errata for each possible misconfiguration?
> 
> Not necessarily.  I think it is a matter of how common the edge case is,
> for example.  I am perfectly fine removing the errata entry if this is
> an extreme edge case.

Well, usage of stripped-down kernel instead of GENERIC may be less common than 
it was 10 years ago.
But not extreme rare because of low-class virtual machines.

Same with stripped-down installed set of files without full set of kernel 
modules
but this may be more extreme as (virtual) disk space is more cheap than RAM.

ZFS-on-root is definitely not so seldom.

___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: krpc: unbootable ZFS-on-root after major upgrade to 11.2

2018-10-22 Thread Andriy Gapon
On 22/10/2018 17:32, Eugene Grosbein wrote:
> 22.10.2018 21:21, Andriy Gapon wrote:
>> This is just a typical foot-shooting (and a shortcoming of the kernel build
>> system that allows such foot-shooting to happen).
>> I think that there can be other ways in which you can specify inconsistent
>> kernel options and/or an incorrect subset of modules in MODULES_OVERRIDE to
>> create missing dependencies for critical modules.
>> Do we want to issue an errata for each possible misconfiguration?
> 
> OTOH, we have option krpc in sys/conf/options but it is not mentioned 
> elsewhere:
> not in the Handbook nor in the sys/conf/NOTES or GENERIC. Not a bit of our 
> documentation mentions
> that ZFS requires KRPC for last 10 years.
> 
> One can call it foot-shooting if it is against documentation but that's not 
> the case.

I certainly agree that there is a lack of documentation.
Still, this is a foot-shooting.

Anyway, my point was about a need to create an erratum for this kind of issue.
A documentation update would be much more appropriate.

-- 
Andriy Gapon
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: krpc: unbootable ZFS-on-root after major upgrade to 11.2

2018-10-22 Thread Glen Barber
On Mon, Oct 22, 2018 at 05:21:43PM +0300, Andriy Gapon wrote:
> On 22/10/2018 17:15, Glen Barber wrote:
> > On Mon, Oct 22, 2018 at 09:09:14PM +0700, Eugene Grosbein wrote:
> >> 22.10.2018 21:03, Glen Barber wrote:
> >>
> >> t's strange that this is a 10.x vs 11.x issue.
> > I see that zfs has the krpc dependency since r193128.
> > And the call to xdrmem_create is there since r168404.
> 
>  You are right. I was mis-informed and have not verified enough a report 
>  from local user.
> 
>  Glen, maybe that errata record should be deleted. The problem is real 
>  but it is long-standing
>  and present in 10.x too.
> 
> >>>
> >>> Could you elaborate more on the failure case you originally reported
> >>> first?  If the problem is real, my feeling is that the errata entry
> >>> should stay, just worded differently to reflect the failure case here.
> >>
> >> zfs.ko depends on krpc.ko. The KRPC code in compiled in GENERIC kernel as 
> >> dependency
> >> of NFS client/server code. The problem arises if all of these are true:
> >>
> >> 1) a system uses custom kernel with NFS options removed;
> >> 2) there is no krpc.ko available due to MODULES_OVERRIDE excluding it;
> >> 3) the system boots off ZFS pool.
> >>
> >> In such case, loader cannot resolve dependency and fails to load zfs.ko
> >> and kernel fails to mount root breaking boot sequence.
> >>
> >>
> > 
> > So, if I understand correctly (and please correct me if I am wrong), the
> > majority of the text in the errata note is correct, however needs to be
> > tweaked to remove "upgrading from 10.x...".  Is this generally correct?
> 
> This is just a typical foot-shooting (and a shortcoming of the kernel build
> system that allows such foot-shooting to happen).
> I think that there can be other ways in which you can specify inconsistent
> kernel options and/or an incorrect subset of modules in MODULES_OVERRIDE to
> create missing dependencies for critical modules.
> Do we want to issue an errata for each possible misconfiguration?
> 

Not necessarily.  I think it is a matter of how common the edge case is,
for example.  I am perfectly fine removing the errata entry if this is
an extreme edge case.  Meaning, I think it would be excessive to
document the fallout from adding 'nodevice mem' to the configuration
file.

Glen



signature.asc
Description: PGP signature


Re: krpc: unbootable ZFS-on-root after major upgrade to 11.2

2018-10-22 Thread Eugene Grosbein
22.10.2018 21:21, Andriy Gapon wrote:

> Glen, maybe that errata record should be deleted. The problem is real but 
> it is long-standing
> and present in 10.x too.
>

 Could you elaborate more on the failure case you originally reported
 first?  If the problem is real, my feeling is that the errata entry
 should stay, just worded differently to reflect the failure case here.
>>>
>>> zfs.ko depends on krpc.ko. The KRPC code in compiled in GENERIC kernel as 
>>> dependency
>>> of NFS client/server code. The problem arises if all of these are true:
>>>
>>> 1) a system uses custom kernel with NFS options removed;
>>> 2) there is no krpc.ko available due to MODULES_OVERRIDE excluding it;
>>> 3) the system boots off ZFS pool.
>>>
>>> In such case, loader cannot resolve dependency and fails to load zfs.ko
>>> and kernel fails to mount root breaking boot sequence.
>>>
>>>
>>
>> So, if I understand correctly (and please correct me if I am wrong), the
>> majority of the text in the errata note is correct, however needs to be
>> tweaked to remove "upgrading from 10.x...".  Is this generally correct?

Yes.

> This is just a typical foot-shooting (and a shortcoming of the kernel build
> system that allows such foot-shooting to happen).
> I think that there can be other ways in which you can specify inconsistent
> kernel options and/or an incorrect subset of modules in MODULES_OVERRIDE to
> create missing dependencies for critical modules.
> Do we want to issue an errata for each possible misconfiguration?

OTOH, we have option krpc in sys/conf/options but it is not mentioned elsewhere:
not in the Handbook nor in the sys/conf/NOTES or GENERIC. Not a bit of our 
documentation mentions
that ZFS requires KRPC for last 10 years.

One can call it foot-shooting if it is against documentation but that's not the 
case.


___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: krpc: unbootable ZFS-on-root after major upgrade to 11.2

2018-10-22 Thread Andriy Gapon
On 22/10/2018 17:15, Glen Barber wrote:
> On Mon, Oct 22, 2018 at 09:09:14PM +0700, Eugene Grosbein wrote:
>> 22.10.2018 21:03, Glen Barber wrote:
>>
>> t's strange that this is a 10.x vs 11.x issue.
> I see that zfs has the krpc dependency since r193128.
> And the call to xdrmem_create is there since r168404.

 You are right. I was mis-informed and have not verified enough a report 
 from local user.

 Glen, maybe that errata record should be deleted. The problem is real but 
 it is long-standing
 and present in 10.x too.

>>>
>>> Could you elaborate more on the failure case you originally reported
>>> first?  If the problem is real, my feeling is that the errata entry
>>> should stay, just worded differently to reflect the failure case here.
>>
>> zfs.ko depends on krpc.ko. The KRPC code in compiled in GENERIC kernel as 
>> dependency
>> of NFS client/server code. The problem arises if all of these are true:
>>
>> 1) a system uses custom kernel with NFS options removed;
>> 2) there is no krpc.ko available due to MODULES_OVERRIDE excluding it;
>> 3) the system boots off ZFS pool.
>>
>> In such case, loader cannot resolve dependency and fails to load zfs.ko
>> and kernel fails to mount root breaking boot sequence.
>>
>>
> 
> So, if I understand correctly (and please correct me if I am wrong), the
> majority of the text in the errata note is correct, however needs to be
> tweaked to remove "upgrading from 10.x...".  Is this generally correct?

This is just a typical foot-shooting (and a shortcoming of the kernel build
system that allows such foot-shooting to happen).
I think that there can be other ways in which you can specify inconsistent
kernel options and/or an incorrect subset of modules in MODULES_OVERRIDE to
create missing dependencies for critical modules.
Do we want to issue an errata for each possible misconfiguration?


-- 
Andriy Gapon
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: krpc: unbootable ZFS-on-root after major upgrade to 11.2

2018-10-22 Thread Glen Barber
On Mon, Oct 22, 2018 at 09:09:14PM +0700, Eugene Grosbein wrote:
> 22.10.2018 21:03, Glen Barber wrote:
> 
> t's strange that this is a 10.x vs 11.x issue.
> >>> I see that zfs has the krpc dependency since r193128.
> >>> And the call to xdrmem_create is there since r168404.
> >>
> >> You are right. I was mis-informed and have not verified enough a report 
> >> from local user.
> >>
> >> Glen, maybe that errata record should be deleted. The problem is real but 
> >> it is long-standing
> >> and present in 10.x too.
> >>
> > 
> > Could you elaborate more on the failure case you originally reported
> > first?  If the problem is real, my feeling is that the errata entry
> > should stay, just worded differently to reflect the failure case here.
> 
> zfs.ko depends on krpc.ko. The KRPC code in compiled in GENERIC kernel as 
> dependency
> of NFS client/server code. The problem arises if all of these are true:
> 
> 1) a system uses custom kernel with NFS options removed;
> 2) there is no krpc.ko available due to MODULES_OVERRIDE excluding it;
> 3) the system boots off ZFS pool.
> 
> In such case, loader cannot resolve dependency and fails to load zfs.ko
> and kernel fails to mount root breaking boot sequence.
> 
> 

So, if I understand correctly (and please correct me if I am wrong), the
majority of the text in the errata note is correct, however needs to be
tweaked to remove "upgrading from 10.x...".  Is this generally correct?

Glen



signature.asc
Description: PGP signature


Re: krpc: unbootable ZFS-on-root after major upgrade to 11.2

2018-10-22 Thread Eugene Grosbein
22.10.2018 21:03, Glen Barber wrote:

t's strange that this is a 10.x vs 11.x issue.
>>> I see that zfs has the krpc dependency since r193128.
>>> And the call to xdrmem_create is there since r168404.
>>
>> You are right. I was mis-informed and have not verified enough a report from 
>> local user.
>>
>> Glen, maybe that errata record should be deleted. The problem is real but it 
>> is long-standing
>> and present in 10.x too.
>>
> 
> Could you elaborate more on the failure case you originally reported
> first?  If the problem is real, my feeling is that the errata entry
> should stay, just worded differently to reflect the failure case here.

zfs.ko depends on krpc.ko. The KRPC code in compiled in GENERIC kernel as 
dependency
of NFS client/server code. The problem arises if all of these are true:

1) a system uses custom kernel with NFS options removed;
2) there is no krpc.ko available due to MODULES_OVERRIDE excluding it;
3) the system boots off ZFS pool.

In such case, loader cannot resolve dependency and fails to load zfs.ko
and kernel fails to mount root breaking boot sequence.


___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: krpc: unbootable ZFS-on-root after major upgrade to 11.2

2018-10-22 Thread Glen Barber
On Mon, Oct 22, 2018 at 08:59:10PM +0700, Eugene Grosbein wrote:
> 19.10.2018 21:34, Andriy Gapon wrote:
> 
> > It's strange that this is a 10.x vs 11.x issue.
> > I see that zfs has the krpc dependency since r193128.
> > And the call to xdrmem_create is there since r168404.
> 
> You are right. I was mis-informed and have not verified enough a report from 
> local user.
> 
> Glen, maybe that errata record should be deleted. The problem is real but it 
> is long-standing
> and present in 10.x too.
> 

Could you elaborate more on the failure case you originally reported
first?  If the problem is real, my feeling is that the errata entry
should stay, just worded differently to reflect the failure case here.

Glen



signature.asc
Description: PGP signature


Re: krpc: unbootable ZFS-on-root after major upgrade to 11.2

2018-10-22 Thread Eugene Grosbein
19.10.2018 21:34, Andriy Gapon wrote:

> It's strange that this is a 10.x vs 11.x issue.
> I see that zfs has the krpc dependency since r193128.
> And the call to xdrmem_create is there since r168404.

You are right. I was mis-informed and have not verified enough a report from 
local user.

Glen, maybe that errata record should be deleted. The problem is real but it is 
long-standing
and present in 10.x too.
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: krpc: unbootable ZFS-on-root after major upgrade to 11.2

2018-10-19 Thread Andriy Gapon
On 19/10/2018 12:24, Eugene Grosbein wrote:
> On 19.10.2018 13:28, Andriy Gapon wrote:
> 
>>> It was brought to my attention that 10.x did not require availability
>>> of krpc for ZFS-on-root system to be bootable but 11.x does.
>>>
>>> That is, major upgrade of 10.x ZFS-on-root system to 11.x
>>> results in non-bootable broken system if it uses custom kernel without NFS 
>>> bits
>>> that automatically come with krpc, and the system was built with 
>>> MODULES_OVERRIDE="zfs opensolaris"
>>> and no krpc mentioned.
>>
>> Could you please also describe specifics of the problem?
>> It's kidn of strange that root-on-zfs requires krpc.
> 
> https://svnweb.freebsd.org/base/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c?revision=339111=markup#l7146
> 
> This code uses some xdr(3) functions to parse zpool.cache
> and kernel-side implementation of xdr(3) is contained in krpc.ko
> 
> Out of curiosity, I've commented out mentioned MODULE_DEPEND(zfsctrl, krpc, 
> 1, 1, 1),
> rebuilt zfs.ko and tried to kldload it using UFS-only system having no NFS 
> code in the kernel
> and it failed with a note in dmesg:
> 
> link_elf: symbol xdrmem_create undefined


It's strange that this is a 10.x vs 11.x issue.
I see that zfs has the krpc dependency since r193128.
And the call to xdrmem_create is there since r168404.


-- 
Andriy Gapon
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: krpc: unbootable ZFS-on-root after major upgrade to 11.2

2018-10-19 Thread Eugene Grosbein
On 19.10.2018 13:28, Andriy Gapon wrote:

>> It was brought to my attention that 10.x did not require availability
>> of krpc for ZFS-on-root system to be bootable but 11.x does.
>>
>> That is, major upgrade of 10.x ZFS-on-root system to 11.x
>> results in non-bootable broken system if it uses custom kernel without NFS 
>> bits
>> that automatically come with krpc, and the system was built with 
>> MODULES_OVERRIDE="zfs opensolaris"
>> and no krpc mentioned.
> 
> Could you please also describe specifics of the problem?
> It's kidn of strange that root-on-zfs requires krpc.

https://svnweb.freebsd.org/base/stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c?revision=339111=markup#l7146

This code uses some xdr(3) functions to parse zpool.cache
and kernel-side implementation of xdr(3) is contained in krpc.ko

Out of curiosity, I've commented out mentioned MODULE_DEPEND(zfsctrl, krpc, 1, 
1, 1),
rebuilt zfs.ko and tried to kldload it using UFS-only system having no NFS code 
in the kernel
and it failed with a note in dmesg:

link_elf: symbol xdrmem_create undefined

___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: krpc: unbootable ZFS-on-root after major upgrade to 11.2

2018-10-19 Thread Andriy Gapon
On 18/10/2018 20:14, Eugene Grosbein wrote:
> Hi!
> 
> It was brought to my attention that 10.x did not require availability
> of krpc for ZFS-on-root system to be bootable but 11.x does.
> 
> That is, major upgrade of 10.x ZFS-on-root system to 11.x
> results in non-bootable broken system if it uses custom kernel without NFS 
> bits
> that automatically come with krpc, and the system was built with 
> MODULES_OVERRIDE="zfs opensolaris"
> and no krpc mentioned.

Could you please also describe specifics of the problem?
It's kidn of strange that root-on-zfs requires krpc.

> We could have mentioned that requrement in Release Notes but we had not.
> 
> Should we issue an Errata Note?



-- 
Andriy Gapon
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"


Re: krpc: unbootable ZFS-on-root after major upgrade to 11.2

2018-10-18 Thread Glen Barber
On Fri, Oct 19, 2018 at 12:14:04AM +0700, Eugene Grosbein wrote:
> Hi!
> 
> It was brought to my attention that 10.x did not require availability
> of krpc for ZFS-on-root system to be bootable but 11.x does.
> 
> That is, major upgrade of 10.x ZFS-on-root system to 11.x
> results in non-bootable broken system if it uses custom kernel without NFS 
> bits
> that automatically come with krpc, and the system was built with 
> MODULES_OVERRIDE="zfs opensolaris"
> and no krpc mentioned.
> 
> We could have mentioned that requrement in Release Notes but we had not.
> 
> Should we issue an Errata Note?
> 

The errata.html page can be updated to note this.

Glen



signature.asc
Description: PGP signature


krpc: unbootable ZFS-on-root after major upgrade to 11.2

2018-10-18 Thread Eugene Grosbein
Hi!

It was brought to my attention that 10.x did not require availability
of krpc for ZFS-on-root system to be bootable but 11.x does.

That is, major upgrade of 10.x ZFS-on-root system to 11.x
results in non-bootable broken system if it uses custom kernel without NFS bits
that automatically come with krpc, and the system was built with 
MODULES_OVERRIDE="zfs opensolaris"
and no krpc mentioned.

We could have mentioned that requrement in Release Notes but we had not.

Should we issue an Errata Note?
___
freebsd-stable@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"