Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kubernetes: Store Kernel/Config/Files/*.pm files in S3 storage #1320

Closed
bschmalhofer opened this issue Oct 14, 2021 · 7 comments
Closed

Kubernetes: Store Kernel/Config/Files/*.pm files in S3 storage #1320

bschmalhofer opened this issue Oct 14, 2021 · 7 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@bschmalhofer
Copy link
Contributor

See the discussion in #1148.
The goal for this issue is to provide a minimal solution. In Kernel::Config::new() we sync the objects in the S3 storage to the Kernel/Config/Files directory. Then go through the features that write *.pm files and make them write into the S3 storage.

@bschmalhofer bschmalhofer added the enhancement New feature or request label Oct 14, 2021
@bschmalhofer bschmalhofer added this to the OTOBO 10.1 milestone Oct 14, 2021
@bschmalhofer bschmalhofer self-assigned this Oct 14, 2021
@bschmalhofer
Copy link
Contributor Author

bschmalhofer commented Oct 20, 2021

For the progress see also #1295.

Another thing to do:

  • Collect the code into an system module like e.g. `Kernel::System::Storage::S3'.

This can be done in the branch for this issue, and then, in #1295, the module ArticleStorageFS can be migrated to the new module.

bschmalhofer added a commit that referenced this issue Oct 21, 2021
bschmalhofer added a commit that referenced this issue Oct 21, 2021
mostly removing unneeded parenthensis
bschmalhofer added a commit that referenced this issue Oct 21, 2021
bschmalhofer added a commit that referenced this issue Oct 21, 2021
loader files can exist when building from a running installation
@bschmalhofer
Copy link
Contributor Author

bschmalhofer commented Oct 22, 2021

TODO:

bschmalhofer added a commit that referenced this issue Oct 22, 2021
bschmalhofer added a commit that referenced this issue Oct 22, 2021
Not using hash lookups has the advantage that spelling errors in the hash keys cannot occur.
bschmalhofer added a commit that referenced this issue Oct 22, 2021
bschmalhofer added a commit that referenced this issue Oct 22, 2021
only the ResultType 'FILE' is supported
bschmalhofer added a commit that referenced this issue Oct 22, 2021
do not write the file into the file system when S3 is active
bschmalhofer added a commit that referenced this issue Oct 22, 2021
@bschmalhofer
Copy link
Contributor Author

Ah well, simply downloading from S3 is problematic. There are different processes reading these files. This means that creation must be atomic and that probably write access must be synchronised.

bschmalhofer added a commit that referenced this issue Oct 23, 2021
These exist only when building from a local installation.
bschmalhofer added a commit that referenced this issue Oct 23, 2021
trailing slashes are tricky
bschmalhofer added a commit that referenced this issue Oct 23, 2021
make sure that downloads from S3 are not concurrent
check size and mtime again after download
bschmalhofer added a commit that referenced this issue Oct 23, 2021
@bschmalhofer
Copy link
Contributor Author

After some fixes we are down to just a few failures in the test suite:

/opt/otobo/scripts/test/Console/Command/Maint/Config/Rebuild.t (Wstat: 256 Tests: 2 Failed: 1)
Failed test: 2
Non-zero exit status: 1
/opt/otobo/scripts/test/Loader.t (Wstat: 65280 Tests: 7 Failed: 0)
Non-zero exit status: 255
Parse errors: No plan found in TAP output
/opt/otobo/scripts/test/PostMaster/CommunicationLog.t (Wstat: 2048 Tests: 377 Failed: 8)
Failed tests: 26, 62, 151, 175, 214, 250, 339, 363
Non-zero exit status: 8
/opt/otobo/scripts/test/Selenium/Agent/MultiAttachmentUpload/CreateScreens.t (Wstat: 256 Tests: 38 Failed: 1)
Failed test: 38
Non-zero exit status: 1
/opt/otobo/scripts/test/SysConfig/ConfigurationDeploy.t (Wstat: 65280 Tests: 10 Failed: 0)
Non-zero exit status: 255
Parse errors: No plan found in TAP output

@bschmalhofer
Copy link
Contributor Author

Noticed that some parts Kernel::System::SysConfig::ConfigurationDeploy() assume that the current dir is /opt/otobo. Futhermore the code assumes that Kernel/Config exists when it found that Kernel/Config/Files is missing. This should be rectivied.

bschmalhofer added a commit that referenced this issue Nov 15, 2021
when storing the object in S3 was successful.
No need to check existence of Kernel/Config/Files when using S3.
bschmalhofer added a commit that referenced this issue Nov 15, 2021
bschmalhofer added a commit that referenced this issue Nov 15, 2021
bschmalhofer added a commit that referenced this issue Nov 15, 2021
from S3 to the file system
bschmalhofer added a commit that referenced this issue Nov 15, 2021
should be defined, not undefined
bschmalhofer added a commit that referenced this issue Nov 15, 2021
including a small sleep, in order to have different modification times
bschmalhofer added a commit that referenced this issue Nov 15, 2021
@bschmalhofer
Copy link
Contributor Author

Some more fixed and test results look a bit better:

Test Summary Report

/opt/otobo/scripts/test/Selenium/Agent/Admin/AdminCustomerGroup.t (Wstat: 513 Tests: 38 Failed: 2)
Failed tests: 37-38
Non-zero exit status: 2
/opt/otobo/scripts/test/Selenium/Agent/AgentTicketSplitInlineImage.t (Wstat: 768 Tests: 33 Failed: 3)
Failed tests: 30, 32-33
Non-zero exit status: 3
/opt/otobo/scripts/test/Selenium/Agent/MultiAttachmentUpload/CreateScreens.t (Wstat: 256 Tests: 38 Failed: 1)
Failed test: 38
Non-zero exit status: 1
/opt/otobo/scripts/test/Selenium/TestingMethods.t (Wstat: 0 Tests: 36 Failed: 0)
TODO passed: 21, 24, 28
/opt/otobo/scripts/test/SysConfig/GlobalEffectiveValueGet.t (Wstat: 256 Tests: 3 Failed: 1)
Failed test: 2
Non-zero exit status: 1
/opt/otobo/scripts/test/WebUserAgent.t (Wstat: 1024 Tests: 121 Failed: 4)
Failed tests: 76-77, 89, 101
Non-zero exit status: 4
Files=956, Tests=81665, 7546 wallclock secs (31.15 usr 3.61 sys + 1962.56 cusr 236.30 csys = 2233.62 CPU)
Result: FAIL
ran tests for product OTOBO 10.1.x on host abb5d5f0a212 .

Some of the failures seem to be sporadic. AgentTicketSplitInlineImage.t and _CreateScreens.t _ seem to be related to S3.

@bschmalhofer
Copy link
Contributor Author

This seems to be working. Closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant