[FIX] 4.x: Identify Vito's own server by install marker, not by 'vito' user alone#1104
Open
erhanurgun wants to merge 1 commit into
Open
[FIX] 4.x: Identify Vito's own server by install marker, not by 'vito' user alone#1104erhanurgun wants to merge 1 commit into
erhanurgun wants to merge 1 commit into
Conversation
…' user alone Custom::create rejected a server whenever `id -u vito` succeeded, which came from vitodeploy#942 against the 3.x bare-metal installer (scripts/install.sh:50). In 4.x Vito ships as a Docker container and does not write a `vito` system user to the host, so the old check false-positives on any unrelated host that already has a `vito` Linux user. Combining the user check with `test -f /home/vito/vito/artisan` (the clone path at scripts/install.sh:197) keeps the original root-only bar and removes the false positive.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1103
Custom::createrejects a server wheneverid -u vitosucceeds (app/ServerProviders/Custom.php~line 86). That guard was added in #942 for the 3.x bare-metal installer which creates avitosystem user (scripts/install.sh:50). In 4.x Vito ships as a Docker container and the installer no longer writes to the host, so any unrelated machine that has avitoLinux user (old bare-metal leftovers, unrelated tooling) is rejected.Combining the user check with
test -f /home/vito/vito/artisan(the pathscripts/install.sh:197clones into) keeps the original root-only bar and removes the false positive.vendor/bin/phpunit --filter "vito" tests/Feature/ServerTest.phpgreen. The existing "cannot create server on Vito server" test is updated to fake the new output token, and a sibling test covers the non-Vito host branch.No migration. Open to a different marker if you prefer.