Unable to delete openshift application - openshift

I installed a PHP application on one of my gears in Openshift. It is a git clone from https://github.com/ThinkUpLLC/ThinkUp/tree/v2.0-beta.10. Something went wrong with the application and hence I would like to delete this application now. However I get an error as "Unable to perform action on app object. Another operation is already running." while trying to delete the application using rhc command tool. I have already tried using rhc app-force-stop, however it did not make any difference.

Sounds a bit like this bug - https://bugzilla.redhat.com/show_bug.cgi?id=997008. There seems to be no solution/workaround though.
Have you tried deleting the application via the web console?

You can try this command, this will kill all the background processes associated with the app.
pbrun /usr/sbin/oo-admin-ctl-app -l svc-<domain-id> -c destroy -a <app-name> -n <domain-id>

Related

Error in AWS ElasticBeanStalk python 27 application that was running fine

I had an py27 application running on aws ElasticBeanStalk for over a year. Recently it stopped working. So I tried to redeploy. During redeploy I got the following error in the logs:
Return code: 1 Output: [CMD-AppDeploy/AppDeployStage0/AppDeployPreHook/03deploy.py]
command failed with error code 1:
/opt/elasticbeanstalk/hooks/appdeploy/pre/03deploy.py
New python executable in /opt/python/run/venv/bin/python27
Not overwriting existing python script /opt/python/run/venv/bin/python
(you must use /opt/python/run/venv/bin/python27)
Can somebody tell me where I will find /opt/python/run/venv/bin/python? How can I change it to
/opt/python/run/venv/bin/python27?
Thanks
When you redeployed, you opted into the latest beanstalk version, which uses a different AMI than the one originally used. If you're familiar with the concept of ebextensions then you're probably looking to add a file like this:
.ebextensions/python.config:
ln -s /opt/python/run/venv/bin/python27 /opt/python/run/venv/bin/python

Troubleshooting failed packer build

I am just getting started with Packer, and have had several instances where my build is failing and I'd LOVE to log in to the box to investigate the cause. However, there doesn't seem to be a packer login or similar command to give me a shell. Instead, the run just terminates and tears down the box before I have a chance to investigate.
I know I can use the --debug flag to pause execution at each stage, but I'm curios if there is a way to just pause after a failed run (and prior to cleanup) and then runt he cleanup after my debugging is complete.
Thanks.
This was my top annoyance with packer. Thankfully, packer build now has an option -on-error that gives you options.
packer build -on-error=ask ... to the rescue.
From the packer build docs:
-on-error=cleanup (default), -on-error=abort, -on-error=ask - Selects what to do when the build fails. cleanup cleans up after the previous steps, deleting temporary files and virtual machines. abort exits without any cleanup, which might require the next build to use -force. ask presents a prompt and waits for you to decide to clean up, abort, or retry the failed step.
Having used Packer extensively, the --debug flag is most helpful. Once the process is paused you SSH to the box with the key (in the current dir) and figure out what is going on.
Yeah, the way I handle this is to put a long sleep in a script inline provisioner after the failing step, then I can ssh onto the box and see what's up. Certainly the debug flag is useful, but if you're running the packer build remotely (I do it on jenkins) you can't really sit there and hit the button.
I do try and run tests on all the stuff I'm packing outside of the build - using the Chef provisioner I've got kitchen tests all over everything before it gets packed. It's a royal pain to try and debug anything besides packer during a packer run.
While looking up info for this myself, I ran across numerous bug reports/feature requests for Packer.
Apparently, someone added new features to the virtualbox and vmware builders a year ago (https://github.com/mitchellh/packer/issues/409), but it hasn't gotten merged into main.
In another bug (https://github.com/mitchellh/packer/issues/1687), they were looking at adding additional features to --debug, but that seemed to stall out.
If a Packer build is failing, first check where the build process has got stuck, but do the check in this sequence:
Are the boot commands the appropriate ones?
Is the preseed config OK?
If 1. and 2. are OK, then it means box has booted and the next to check is the login: SSH keys, ports, ...
Finally any issues within the provisioning scripts

Openshift MYSQL environment variables not set

all my MySQL environment variables result in an empty string such as
echo getenv('OPENSHIFT_MYSQL_DB_URL');
echo getenv('OPENSHIFT_MYSQL_DB_HOST');
however the others such as
echo getenv('OPENSHIFT_APP_NAME');
echo getenv('OPENSHIFT_REPO_DIR');
work perfectlly fine. Any ideas what i am doing wrong?
I had the same issue, and tried creating and recreating Applications multiple times without success
The solution was to use Git to push the code to Openshift (at least one time), if you only use sFTP to push the code, those variables will not be accessible
You can just use the rhc app stop & rhc app start commands to restart your application and the environment variables will then be provided to your application. Make sure that you don't just use the rhc app restart command, as it doesn't not usually work, think of it as an apachectl stop/start vs apachectl reload.

Configuring Bazaar in Hudson

I am trying to configure a task in Hudson for a VC++ project. I was able to build a project from the file system with MSBuild task. But when I try to configure the task to check out a bazaar repo to do the build, checkout is always failing in authentication. Bazaar passwordless access is setup on the machine and when I use bzr cmd line, checkout is happening without password. Another post suggested that I should have the id_rsa in C:\Documents and Settings\Administrator.hudson - but that also did not help. In Subversion config I saw a way of mentioning username and password. Is there any way to get around this problem.
I assume you have set up the authentication in the windows equivalent of ~/.bazaar/authentication.conf (use bzr version -v to get the correct location).
Is hudson running as the same user as the one you use to connect with the command-line? Because that will impact which authentication.conf it will try to use.
My hudson is using authentication.conf fine but I run it on Ubuntu.
I solved the problem. The authentication.conf is not being considered in windows. I made the repo accessible through http and configured the bazaar with that URL. It was able to download the repo with http protocol without asking for password. One more thing I did was I created a username in hudson, which I matched with a user having access in the bazaar repo which solved another problem which was asking for a user named pwd.

Hudson .jelly files edit not reflected

I edited a few .jelly files for Hudson, but it's not reflected. How do I restart Hudson ? I hope that this will display the HTML tag changes made in the .jelly files.
I am trying to change the look and feel of the Hudson.
On what OS do you run Hudson? How did you install Hudson? .....
The basic idea is to stop Hudson (or just kill it) and than start it the same way it was started before. If you are not the person who installed it, call the person. After a while they get tired of you asking and will give you the instructions (and also the permissions) to do it yourself. ;)
If you have create plugin with mvn -U org.jenkins-ci.tools:maven-hpi-plugin:create command.
This will have in built Hudson.
You can run mvn hpi:run at location of plugin.
You can debug using mvnDebug hpi:run.
mvnDebug by default uses 8000 port,if you are using eclipse as IDE, Go to Run -> open Debug Config -> Select plugin and port and start debug. This will do remote debugging on 8000 port.