Skip to content

Conversation

@Masayuki-Hirayabu
Copy link

@Masayuki-Hirayabu Masayuki-Hirayabu commented Jul 9, 2024

Hello.

In Present, the function-alert test is failed when the volume to place a data directory is small, because an alert is triggered when a remaining volume of a pg_global falls below a threshold.

The places that cause the test to fail are follows.
The test overwrites a remaining volume of pg_default to make it look smaller for triger a alert.
It is set in the following places.

UPDATE statsrepo.tablespace SET (avail, total) = (1.9*1024^3, 10*1024^3) WHERE name = 'pg_default' AND snapid = 2;

And the log output at this time is follows.
The second line is the log that causes the test to failed.

free disk space ratio at 'pg_default' fell below threshold in snapshot 'xxx' --- 19 % (threshold = 20 %)
free disk space ratio at 'pg_global' fell below threshold in snapshot 'xxx' --- 18.8 % (threshold = 20 %)

Test results should not diffrent by environment, so I propose this solution.
It is the test overwrites a remaining volume of pg_global to make it look bigger for not triger a alert.
This is made alerted in only pg_default.

As a side note, another solution is eixsted for this problem.
It is the test overwrites a remaining volume of pg_global to make it look smaller for triger a alert.
This is made alerted in both pg_default and pg_blobal.
But, the purpose of this test is to confirm that an alert will be triggered when a remaining volume is below the threshold, so it only needs to be confirmed in one tablespace.

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