-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
mysql commands do not work via devfile commands (Theia Tasks) #13416
Comments
@mmorhun could you share your investigation result here ? |
I did investigation and the root problem is that all Che tasks is run in non-interactive shell. Because of this, To fix the problem without changing the image, we need to run such Che tasks in interactive shells. But we cannot predict if a task requires interactive shell, so we have to run every task in interactive shell (which would be a plus, imo). But some scripts which is designed for non-interactive shells might not work properly. So, is it ok to run all Che tasks in interactive shell ? @AndrienkoAleksandr @l0rd @RomanNikitenko @evidolob @sunix |
Like variant we can apply some option in the dev file and for che task... But maybe it would be better to do this after GA. Like workaround for current mysql devfile, we can define in the commands full path to the mysql binary and it should work. |
As a workaround for GA, would it be possible to update the task to point directly at the |
@amisevsk yes, it will work and very easy to fix. |
It has nothing to do with 'interactive' aspect of a shell ... but anyway ... I would say it is not a bug as the container is not supposed to call mysql binary directly: Our commands should try to respect the one that is used in the container CMD. https://github.com/sclorg/mysql-container/blob/master/5.7/Dockerfile#L80
Are we missing the ability to define env variables from the che commands ? From README:
It seems that the env variable are already defined so just calling run-mysqld should work (if the goal is to start the database) If the goal is to open a terminal: use full path yes. |
In devfile registry the command from |
Description
mysql commands do not work via devfile commands (Theia Tasks)
Reproduction Steps
Devfile
open database command line
tasks.Expected: terminal with mysql is run
Actual:
mysql command is not found
message is shownNote that if you open terminal in
mysql
container and execute command (mysql -u $MYSQL_USER -p$MYSQL_PASSWORD --database=$MYSQL_DATABASE
) there then it works just fine.Also, we did some short investigation with @AndrienkoAleksandr and made sure that exec-plugin and terminal have the same uid in shell.
OS and version:
Was reproduced on Che deployed on Minishift.
Diagnostics:
The text was updated successfully, but these errors were encountered: