-
Notifications
You must be signed in to change notification settings - Fork 303
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
searxng - ACL for hostPath + ixVolume migration #1688
Conversation
cba9f1d
to
bbf5d00
Compare
bd26788
to
cb5d192
Compare
- variable: aclEntries | ||
label: ACL Configuration | ||
schema: | ||
type: dict | ||
show_if: [["aclEnable", "=", true]] | ||
attrs: [] | ||
$ref: | ||
- "normalize/acl" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm adding ACL entries here fails with key error (path
)
Error: Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/middlewared/job.py", line 426, in run
await self.future
File "/usr/lib/python3/dist-packages/middlewared/job.py", line 464, in __run_body
rv = await self.method(*([self] + args))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/middlewared/service/crud_service.py", line 194, in nf
rv = await func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/middlewared/schema/processor.py", line 44, in nf
res = await f(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/middlewared/schema/processor.py", line 177, in nf
return await func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/middlewared/plugins/chart_releases_linux/chart_release.py", line 538, in do_update
config, context = await self.normalise_and_validate_values(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/middlewared/plugins/chart_releases_linux/chart_release.py", line 342, in normalise_and_validate_values
return await self.middleware.call(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1398, in call
return await self._call(
^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1341, in _call
return await methodobj(*prepared_call.args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/middlewared/plugins/chart_releases_linux/normalize_schema.py", line 42, in get_normalized_values
values[attr.name] = await self.normalize_question(attr, values[attr.name], update, values, context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/middlewared/plugins/chart_releases_linux/normalize_schema.py", line 55, in normalize_question
value[attr.name] = await self.normalize_question(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/middlewared/plugins/chart_releases_linux/normalize_schema.py", line 63, in normalize_question
value[index] = await self.normalize_question(attr, item, update, complete_config, context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/middlewared/plugins/chart_releases_linux/normalize_schema.py", line 55, in normalize_question
value[attr.name] = await self.normalize_question(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/middlewared/plugins/chart_releases_linux/normalize_schema.py", line 55, in normalize_question
value[attr.name] = await self.normalize_question(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/middlewared/plugins/chart_releases_linux/normalize_schema.py", line 66, in normalize_question
value = await self.middleware.call(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1398, in call
return await self._call(
^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/middlewared/main.py", line 1341, in _call
return await methodobj(*prepared_call.args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/middlewared/plugins/chart_releases_linux/normalize_schema.py", line 184, in normalize_acl
if not value or any(not value[k] for k in ('entries', 'path')):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/middlewared/plugins/chart_releases_linux/normalize_schema.py", line 184, in <genexpr>
if not value or any(not value[k] for k in ('entries', 'path')):
~~~~~^^^
KeyError: 'path'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay had to remove $ref
normalize/acl when its under a dict with $ref
normalize/ixVolume
7606247
to
9dbad2c
Compare
a483559
to
c07f1f6
Compare
c07f1f6
to
18a188c
Compare
d060c0f
to
5e8e793
Compare
69fcc64
to
cbea159
Compare
f5f4390
to
4fa8f75
Compare
488d214
to
f1b687d
Compare
4fa8f75
to
16a2da8
Compare
f1b687d
to
57814f7
Compare
16a2da8
to
bfac0c7
Compare
57814f7
to
cb03417
Compare
bfac0c7
to
f2b7ad7
Compare
cb03417
to
1201f30
Compare
f2b7ad7
to
9545c63
Compare
1201f30
to
5f362c0
Compare
9545c63
to
9d32f5f
Compare
5f362c0
to
a89e628
Compare
ff15b5a
to
111b5d2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should be good provided the merge conflict is resolved ofc
111b5d2
to
13483aa
Compare
A migration added under
migrations
dir for existing installations. Also a minor migration added in helm side, but that's only for CI, as we test upgrades with previous chart too. It can be safely removed on the next bump.Related:
truenas/catalog_validation#78
Maybe we should comment out aclEntries from schema for now, until the next Cobia release?
This should allow us to perform the migration on the rest of the apps, and will only need to uncomment it when the changes are in
After this is approved and finalized, I'll proceed updating/migrating the rest of the apps
Depends on #1702