2016-12-21 30 views
1

因爲我必須修改應用程序,所以它已經有一段時間了。今天,做是另一回事部署我由於某些文件中的權限不對,無法部署應用程序

Counting objects: 16, done. 
Delta compression using up to 4 threads. 
Compressing objects: 100% (16/16), done. 
Writing objects: 100% (16/16), 1.44 KiB | 0 bytes/s, done. 
Total 16 (delta 11), reused 0 (delta 0) 
remote: Stopping Cron cartridge 
remote: CLIENT_RESULT: cron scheduling service is already disabled for gear <<OPENSHIFHASH>> 
remote: Stopping PHP 5.4 cartridge (Apache+mod_php) 
remote: Stopping PHPMyAdmin cartridge 
remote: Operation not permitted - /var/lib/openshift/<<OPENSHIFHASH>>/app-deployments/2016-09-25_11-55-15.153/repo/utils/PkgInfo.pyc 
To ssh://<<OPENSHIFHASH>>@<<APP>>.rhcloud.com/~/git/app.git/ 
! [remote rejected] master -> master (pre-receive hook declined) 
error: failed to push some refs to 'ssh://<<OPENSHIFHASH>>@<<APP>>.rhcloud.com/~/git/app.git/' 

然後我登錄使用ssh,我發現,其實該文件PkgInfo.pycroot自己的時候,其實應該由應用程序擁有

這樣

-rw-------. 1 <<OPENSHIFHASH>> <<OPENSHIFHASH>> 2929 Sep 25 11:55 HashCache.pyc 
-rw-------. 1 <<OPENSHIFHASH>> <<OPENSHIFHASH>>  0 Sep 25 11:55 __init__.py 
-rw-------. 1 root      root      101 Oct 23 00:10 __init__.pyc 
-rw-------. 1 <<OPENSHIFHASH>> <<OPENSHIFHASH>> 8991 Sep 25 11:55 MultiPart.py 
-rw-------. 1 <<OPENSHIFHASH>> <<OPENSHIFHASH>> 8051 Sep 25 11:55 MultiPart.pyc 
-rw-------. 1 <<OPENSHIFHASH>> <<OPENSHIFHASH>> 646 Sep 25 11:55 PkgInfo.py 
-rw-------. 1 root      root      613 Oct 23 00:10 PkgInfo.pyc 
-rw-------. 1 <<OPENSHIFHASH>> <<OPENSHIFHASH>> 6607 Sep 25 11:55 Progress.py 

爲什麼該文件會更改所有者?該文件已於10月23日更新,但我(作爲應用程序)我無法將它們更改爲root

任何想法?

回答

0

我相信我有同樣的問題,但不同的墨盒/應用程序體系結構,所以錯誤日誌是不同的。 OpenShift幫助建議to file a bug about it

我目前的解決方法使用手動部署:

  1. 禁用自動部署與$ rhc app-configure <YOUR_APP> --no-auto-deploy
  2. $ git push origin
  3. $ ssh <YOUR_APP>@<YOUR_APP>.rhcloud.com
  4. $ gear build
  5. 運行gear start您的所有墨盒 - 確保他們成功運行

這不是最佳的,但希望它有幫助。

相關問題