Comments (5)
Possibly related to https://github.com/lando/lando/issues/3091
$ lando ssh -s cli -c "ls -al /lando/keys"
...
-rw------- 1 user dialout 1811 Sep 9 06:44 lagoon-32ee3a15-b507-4591-902e-e848c300b924
$ lando ssh -s cli -c "cat /etc/ssh/ssh_config"
Host *
User "al"
StrictHostKeyChecking no
UserKnownHostsFile=/dev/null
LogLevel=FATAL
$ lando logs -s cli
cli_1 | loadkeys 11:16:12.69 INFO ==> Scanning /lando/keys for keys...
cli_1 | loadkeys 11:16:12.70 INFO ==> Scanning /var/www/.ssh for keys...
cli_1 | loadkeys 11:16:12.71 INFO ==> Scanning /user/.ssh for keys...
cli_1 | loadkeys 11:16:12.72 INFO ==> Found keys /lando/keys/lagoon-32ee3a15-b507-4591-902e-e848c300b924
cli_1 | loadkeys 11:16:12.72 DEBUG ==> Ensuring permissions and ownership of /lando/keys/lagoon-32ee3a15-b507-4591-902e-e848c300b924...
cli_1 | loadkeys 11:16:12.75 DEBUG ==> Checking whether /lando/keys/lagoon-32ee3a15-b507-4591-902e-e848c300b924 is a private key...
cli_1 | loadkeys 11:16:12.76 INFO ==> Using the following keys:
$ lando ssh -s cli -c "cat /lando/keys/lagoon-32ee3a15-b507-4591-902e-e848c300b924"
-----BEGIN OPENSSH PRIVATE KEY-----
...
...
...
...
...
-----END OPENSSH PRIVATE KEY-----
So it never gets past the -L
to actually add the key.
Am I on the wrong hunt here? The logic looks wrong. -l
would make sense. But again, I'm unsure of the reasoning behind the entire block of code.
from cli.
So big goose hunt on with @pirog over slack. We may have found an underlying cause for the inconsistencies. This looks like its due to a BusyBox flavour of grep.
grep -L "PRIVATE KEY" /lando/keys/a-random-key
returns nothing. No status code 0.
Docker image uselagoon/php-7.3-cli-drupal
if you go up the chain of FROM's is based off of FROM alpine:3.14
To upgrade grep to a gnu install, and make it work, in your Dockerfile you could add:
RUN apk add --no-cache --upgrade grep
It would appear there is some inconsistencies between the greps out there.
But thats not really a fix to a problem. Alpine will continue to use busybox grep, this continues to pop-up as a problem.
I wonder if something like busybox detection might be the answer here? Minimal impact.
if grep --help 2>&1 | grep -q -i "busybox"; then
... this greps crazy shit, set a diff condition
fi
https://bugs.busybox.net/show_bug.cgi?id=13151
https://lists.gnu.org/archive/html/bug-grep/2017-08/msg00010.html
from cli.
@sonuku to add more fun to this we get status code 0
on alpine:3.13
so i'm guessing this started showing up when Lagoon bumped up to alpine:3.14
.
All said and now that we understand the issue here i think we should just switch over to the -l
from -L
as you initially recommended. That seems like the option we want anyway and THEORETICALLY it should produce the same behavior in our none alpine:3.14
images.
from cli.
Yeah seems depending on your grep version (even gnu) -L
is a bit fucky. Pasted in the bug reports in above comment.
from cli.
hihi - circling the square here - wherever possible we try to avoid overwriting the busybox packages, just to avoid potential complications. Thanks for digging into this @sonuku!
from cli.
Related Issues (20)
- Support Node 18 HOT 4
- Duplicate project name detection and prevention HOT 5
- Docker-compose version fails on darwin 21.5.0 HOT 1
- [question] Terminal COLUMNS HOT 1
- Change permission 100999 HOT 2
- [v3.8.1] WSL2 database connection issue HOT 3
- [v3.12.0] Error in WSL2 HOT 2
- Error on lando rebuild with lando 3.17 HOT 2
- How can the default path of lando ssh be changed? HOT 2
- "lando ssh -c" does not parse its argument like a shell command within the container HOT 5
- "ERROR ==> Invalid host defined options" after start HOT 4
- [v3.20.2] Verbose output when only expecting version? HOT 2
- Crash handler does not respect --yes HOT 3
- SSL
- Lando update "Lando cannot write to /usr/local/bin!" HOT 1
- Suggestion: lando init creates dir or offers to HOT 2
- Lando requests using ipv6 failing HOT 2
- `lando update` always shows lando/cli as update available HOT 7
- Automate release from lando/cli to lando/lando
- Add option to disable unsupported version banner HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cli.