Skip to content

Fix some bugs with quota units.#16

Open
macrotex wants to merge 1 commit intoauristor:masterfrom
macrotex:master
Open

Fix some bugs with quota units.#16
macrotex wants to merge 1 commit intoauristor:masterfrom
macrotex:master

Conversation

@macrotex
Copy link
Contributor

@macrotex macrotex commented Oct 2, 2025

In the create_volume() function the following command appears:

my @command = ('-t', 'logs', $volume, $quota_kbytes, $mountpoint);

These arguments are used with the "volcreate" command. However, the volcreate command defaults to megabytes if the quota units are not specified. Thus sending $quota_kbytes without units causes volcreate to set the quota at 1000 times too large a value. The solution is to change '$quota_kbytes' to '"${quota_kbytes}k"'.

Furthermore the function that parses the logs converts the quota number from megabytes into kilobytes. This would be OK except the configuration that is passed to the volume create assumes that the value is in megabytes. The solution is to simply remove this section of code.

In the create_volume() function the following command appears:

  my @command = ('-t', 'logs', $volume, $quota_kbytes, $mountpoint);

These arguments are used with the "volcreate" command. However, the volcreate
command defaults to megabytes if the quota units are not specified. Thus
sending $quota_kbytes without units causes volcreate to set the quota at
1000 times too large a value. The solution is to change '$quota_kbytes' to
'"${quota_kbytes}k"'.

Furthermore the function that parses the logs converts the quota number
from megabytes into kilobytes. This would be OK except the configuration
that is passed to the volume create assumes that the value is in megabytes.
The solution is to simply remove this section of code.
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

Successfully merging this pull request may close these issues.

1 participant

Comments