server icon indicating copy to clipboard operation
server copied to clipboard

[stable25] Quota value as float for 32-bit systems

Open PVince81 opened this issue 2 years ago • 26 comments

  • Resolves: https://github.com/nextcloud/server/issues/34010#issuecomment-1345691736

Summary

TODO

Checklist

PVince81 avatar Dec 12 '22 09:12 PVince81

/backport to stable24

PVince81 avatar Dec 12 '22 09:12 PVince81

@PVince81 I am under the impression that this error does again only happen on 32-bit due to the php int limit. Are you sure that this does not break on 64-bit?

szaimen avatar Dec 12 '22 09:12 szaimen

same problem here... "message":"Typed property OC\Files\Storage\Wrapper\Quota::$quota must be int or null, float used in file '/var/www/html/nextcloud/lib/private/Files/Storage/Wrapper/Quota.php

emc02 avatar Dec 12 '22 10:12 emc02

We should just remove the type hint and only use a phpdoc type hint of int|float, with an explanation that it may be float on 32bits.

Sounds good to me 👍

szaimen avatar Dec 12 '22 11:12 szaimen

我什么都不懂,麻烦你了,,帮帮我

346354343 @.***

 

------------------ 原始邮件 ------------------ 发件人: "nextcloud/server" @.>; 发送时间: 2022年12月12日(星期一) 晚上7:15 @.>; @.***>; 主题: 回复:[nextcloud/server] [stable25] 32 位系统的浮点配额值(PR #35734)

我们应该只删除类型提示,只使用 int|float 的 phpdoc 类型提示,并说明它可能在 32 位上是浮点数。

听起来不错👍

— 直接回复此邮件,在 GitHub 上查看,或取消订阅。 您收到此消息是因为您订阅了此线程。Message ID: @.***>

gfggfgfsg avatar Dec 12 '22 11:12 gfggfgfsg

What lines should be changed? I could test it on my 32bit raspberry system.

emc02 avatar Dec 12 '22 14:12 emc02

@homeessentials1 @emc02

cd /path/to/nextcloud curl -L https://github.com/nextcloud/server/pull/35734.patch -o 35734-quota-32bit-fix.patch patch -p1 < 35734-quota-32bit-fix.patch

PVince81 avatar Dec 13 '22 17:12 PVince81

can someone else take over, possibly someone with access to a 32-bit system ? I don't have time to dig deeper and try every combination. We need a solution that works both for 32-bit and 64-bit systems, for positive and negative quota values (negative values are for special cases like "unlimied")

PVince81 avatar Dec 15 '22 08:12 PVince81

can someone else take over,

I am sorry, I have not the experience to do that, but I can test various possible solutions if wanted and report back

emc02 avatar Dec 15 '22 10:12 emc02

it looks like so far there were three solutions:

  • no type: causing warnings ?
  • float: breaking negative values ?
  • int: broke with 32-bits

maybe more changes are needed

@come-nc can you take over maybe ?

PVince81 avatar Dec 15 '22 11:12 PVince81

@come-nc can you take over maybe ?

Next week if I have the time, I will. I think we should setup a 32bit CI for stable25.

come-nc avatar Dec 15 '22 15:12 come-nc

@come-nc can you take over maybe ?

Next week if I have the time, I will.

I think we should setup a 32bit CI for stable25.

Glad we have next week already 😀 Not kidding: few of my users are basically unable to use NC (no files shown at all) since v25. What else can 32 bit users test?!! I'm at a "it couldn't get any worse" position, so let's go.

bcutter avatar Dec 19 '22 22:12 bcutter

Glad we have next week already grinning Not kidding: few of my users are basically unable to use NC (no files shown at all) since v25. What else can 32 bit users test?!! I'm at a "it couldn't get any worse" position, so let's go.

Well I did take over, but I cannot test as I do not have any 32bits system so I am waiting for people to test this and tell me if it’s good to merge.

come-nc avatar Dec 20 '22 08:12 come-nc

@lapineige Are you able to test this on a 32-bit system, e.g. using the PR's patch: https://github.com/nextcloud/server/pull/35734#issuecomment-1349119926

I sadly forgot to enable remote SSH for my 32-bit home server and are on vacation until January.

MichaIng avatar Dec 20 '22 10:12 MichaIng

@lapineige Are you able to test this on a 32-bit system, e.g. using the PR's patch: #35734 (comment)

I sadly forgot to enable remote SSH for my 32-bit home server and are on vacation until January.

Tried the patch: Changing quota to unlimited works changing quota to any other value results in zero quota and "Space Full"

no entrys in Log

emc02 avatar Dec 20 '22 13:12 emc02

@MichaIng : Can I do that if I already manually patched it with https://github.com/nextcloud/server/pull/34905#issuecomment-1345388301 ?

lapineige avatar Dec 20 '22 14:12 lapineige

Tried the patch: Changing quota to unlimited works changing quota to any other value results in zero quota and "Space Full"

no entrys in Log

Did the whole patch apply without errors?

come-nc avatar Dec 20 '22 16:12 come-nc

@MichaIng : Can I do that if I already manually patched it with #34905 (comment) ?

No most likely the patch will not apply, you would need to reverse the first patch with "patch -R" first if possible. Or to start back from last Nextcloud 25.

come-nc avatar Dec 20 '22 16:12 come-nc

Tried the patch: Changing quota to unlimited works changing quota to any other value results in zero quota and "Space Full" no entrys in Log

Did the whole patch apply without errors?

Did a clean install of 25.0.2 and applied the patch. All items were successfully and without errors.

emc02 avatar Dec 20 '22 16:12 emc02

you would need to reverse the first patch with "patch -R" first if possible

That would be manual, due to broken syntax in the github message I did it by hand.

I'm not willing to try until a few days, to have time to work on it, in case it fails…

lapineige avatar Dec 20 '22 17:12 lapineige

I can try everything :-D It's just a testing instance. So provide me some possible solutions and I'll test it!

emc02 avatar Dec 20 '22 17:12 emc02

changing quota to any other value results in zero quota and "Space Full"

This is still true? Strange as https://github.com/nextcloud/server/pull/34905#issuecomment-1345388301 does work 🤔.

MichaIng avatar Dec 21 '22 02:12 MichaIng

Tested patch 35734 on 32-bit system and it fixes the issue (login is possible again for users with a 10 GB quota). Do you still need help for some specific tests? I have access to both 32- and 64-bit test systems.

Nils160988 avatar Dec 21 '22 15:12 Nils160988

Tested patch 35734 on 32-bit system and it fixes the issue (login is possible again for users with a 10 GB quota). Do you still need help for some specific tests? I have access to both 32- and 64-bit test systems.

I would like to know if with the patch there are still issues or not. Some people said the quota display was broken, is that fixed as well with the patch?

And I would love if someone could run the test suite on 32bits and tell me if there are errors/failures. Running ./autotest.sh sqlite tests/lib/Files should be enough as quota related tests should be in this folder.

come-nc avatar Dec 22 '22 09:12 come-nc

Just as a quick answer: Quota display is fine with the patch at 32-bit, can't run the test at the moment.

Nils160988 avatar Dec 22 '22 16:12 Nils160988

@homeessentials1 @emc02

cd /path/to/nextcloud curl -L https://github.com/nextcloud/server/pull/35734.patch -o 35734-quota-32bit-fix.patch patch -p1 < 35734-quota-32bit-fix.patch

Work for me. Thank you.

AngelGJ avatar Dec 29 '22 15:12 AngelGJ

When this get merged, can we expect it to be released with an upcoming 25.x point release ?

lapineige avatar Jan 01 '23 14:01 lapineige

When this get merged, can we expect it to be released with an upcoming 25.x point release ?

yes, it will be included in 25.0.3

szaimen avatar Jan 02 '23 15:01 szaimen

25.0.3 on 32bit Debian.. issue persists; setting a quota results in "0 B" or "1 GB"

Dee-san avatar Jan 19 '23 18:01 Dee-san

Same here, Nextcloud 25.0.3 installed with Yunohost : https://github.com/YunoHost-Apps/nextcloud_ynh/pull/532

lapineige avatar Jan 23 '23 14:01 lapineige