2015-10-20 37 views
0

嗨!

我已經過鉤,一個用於pre_start,一個用於post_start。Openshift pre_start和post_start鉤無限循環

  • pre_start開始編寫自己的腳本,如:nohup python foo.py > /dev/null &
  • foo.py運行汽車無做的東西像往常一樣。
  • post_start只是用於診斷一切運行正常,它只是調用ps aux併發送一封關於它的電子郵件。 (這是一個Python腳本與認領)

現在。正如我承諾,推動東西開始重建,並與兩個pre_start和post_start腳本:(

些許消息是他們之間,在一個無限循環,我不明白,結束了:

remote: Script /var/lib/openshift/5...3/python//virtenv/bin/activate.fish cannot be made relative (it's not a normal script that starts with #!/var/lib/openshift/5...3/python/virtenv/bin/python) 
remote: Script /var/lib/openshift/5...3/python//virtenv/bin/activate.csh cannot be made relative (it's not a normal script that starts with #!/var/lib/openshift/5...3/python/virtenv/bin/python) 

感謝您的幫助!:)

回答

0

正如我所見,這很正常。你有很多次的墨盒會被調用。在我的秋天4次...我必須處理這個,重新命名我的鉤子後綴python-2.7所以:pre_start_python-2.7。這樣它只能運行一次。

下面是部署過程中的事件日誌:

remote: Preparing build for deployment 
remote: Deployment id is 4e9628aa 
remote: Activating deployment 
remote: pre_start called 
remote: Starting Cron cartridge 
remote: post_start called 
remote: pre_start called 
remote: Starting MongoDB cartridge 
remote: Waiting for mongo to start... 
remote: post_start called 
remote: pre_start called 
remote: Starting RockMongo cartridge 
remote: post_start called 
remote: Script /var/lib/openshift/5...3/python//virtenv/bin/activate.fish cannot be made relative (it's not a normal script that starts with #!/var/lib/openshift/5...3/python/virtenv/bin/python) 
remote: Script /var/lib/openshift/5...3/python//virtenv/bin/activate.csh cannot be made relative (it's not a normal script that starts with #!/var/lib/openshift/5...3/python/virtenv/bin/python) 
remote: pre_start called 
remote: Starting Python 2.7 cartridge (Apache+mod_wsgi) 
remote: Application directory "/" selected as DocumentRoot 
remote: Application "wsgi.py" selected as default WSGI entry point 
remote: post_start called 
remote: ------------------------- 
remote: Git Post-Receive Result: success