-
Notifications
You must be signed in to change notification settings - Fork 475
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
IsDirty: Exception when executed without parameters #1751
Labels
Comments
votdev
added a commit
to votdev/openmediavault
that referenced
this issue
May 3, 2024
Note, the whole handling of the `params` argument of the RPC implementation is faulty, but it can not be fixed without breaking existing code and behavior in core and all existing plugins. Therefore, the current implementation will be retained, even if it is wrong. The error is the processing of the `params` argument. This is not converted and processed as PHP objects but converted into an associative array. As a result, the information is lost as to whether it is an empty object or an empty array. Relates to: openmediavault#1751 Signed-off-by: Volker Theile <votdev@gmx.de>
2 tasks
With the PR #1757 the RPC can be called via |
votdev
added a commit
that referenced
this issue
May 3, 2024
Note, the whole handling of the `params` argument of the RPC implementation is faulty, but it can not be fixed without breaking existing code and behavior in core and all existing plugins. Therefore, the current implementation will be retained, even if it is wrong. The error is the processing of the `params` argument. This is not converted and processed as PHP objects but converted into an associative array. As a result, the information is lost as to whether it is an empty object or an empty array. Relates to: #1751 Signed-off-by: Volker Theile <votdev@gmx.de>
votdev
added a commit
that referenced
this issue
May 9, 2024
Related to: #1751 Signed-off-by: Volker Theile <votdev@gmx.de>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
the return of the command:
/usr/sbin/omv-rpc -u admin config isDirty 2>&1| jq
.should return true or false. With omv6 it was ok.Hereunder is the return since I migrated to OMV7. I have the same error on two separate servers.
https://github.com/openmediavault/openmediavault/blob/0a326a200927cce1c333ee561537882bee86fc0b/deb/openmediavault/usr/share/openmediavault/engined/rpc/config.inc#L59C3-L59C62
params is validated even if is null or empty:
openmediavault/deb/openmediavault/usr/share/php/openmediavault/rpc/serviceabstract.inc
Line 172 in 0a326a2
rpc.config.isDisrty model includes information about params not being required:
openmediavault/deb/openmediavault/usr/share/openmediavault/datamodels/rpc.config.json
Lines 2 to 12 in 0a326a2
as mentionned in forum the workaround to use isDirty could be
sudo omv-rpc -u admin config isDirty "{\"modules\":$(</var/lib/openmediavault/dirtymodules.json)}"
orsudo omv-rpc -u admin config isDirty '{"modules":[]}'
Would it be possible to use isDirty without supplying $params as previously ?
The text was updated successfully, but these errors were encountered: