SURFnet / rd-sram-integration

Research Drive / SURF Research Access Management Integration
2 stars 3 forks source link

oc_uc_fg_group_user: not found #235

Closed michielbdejong closed 1 year ago

michielbdejong commented 1 year ago

split out from #234

michielbdejong commented 1 year ago

Trying to reproduce this by running https://github.com/pondersource/dev-stock/blob/415b275/scripts/testing-rd-sram.sh#L84 interactively

michielbdejong commented 1 year ago

Trying to see what happens if i comment out https://github.com/SURFnet/rd-sram-integration/blame/490d554/federatedgroups/appinfo/Migrations/Version20230523140843.php#L42-L45

soltanireza65 commented 1 year ago

@michielbdejong image These are the tables when running bootstrap_rd_sram

soltanireza65 commented 1 year ago

{$prefix}uc_fg_group_user This is the unique index for user and group combination we made when Tom asked for it

soltanireza65 commented 1 year ago

unique index uncommented image

michielbdejong commented 1 year ago

@soltanireza65 sorry to hear you couldn't reproduce this bug, let's try together!

michielbdejong commented 1 year ago

Conclusion: Reza wasn't trying to reproduce this issue, he was just trying to find the underlying truth or falsehood of the content of the error message. So now our setup script reproducibly prints an error, but we think it can be safely ignored. Reza will try to dig into it more.

michielbdejong commented 1 year ago

On Tom's system the error message looks slightly different:

[root@255d201065ce owncloud]# sudo -u apache php occ app:enable federatedgroups
sh: line 1: oc_uc_fg_group_user: command not found
federatedgroups enabled

I've been digging into the occ command and it goes through https://github.com/owncloud/core/tree/master/lib/private/Console to https://github.com/doctrine/dbal/blob/aadddd5/src/Schema/Table.php#L225 and I can't see any shell execution or string 'not found' anywhere..

Aaah, I understand now! it's because of the backticks - when executing the php script using a shebang line like https://github.com/owncloud/core/blob/master/occ#L1 then ultimately the shell execution will evaluate those backticks as https://unix.stackexchange.com/questions/27428/what-does-backquote-backtick-mean-in-commands

So let's replace it with " and try again! :)