Skip to content
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

The progress is not displayed in the second deployment. #4

Open
wycc opened this issue Aug 28, 2013 · 10 comments
Open

The progress is not displayed in the second deployment. #4

wycc opened this issue Aug 28, 2013 · 10 comments
Assignees
Milestone

Comments

@wycc
Copy link
Collaborator

wycc commented Aug 28, 2013

When we deploy the application for the second time, the messgae is not changed at all.

@ghost ghost assigned pencilcheck Aug 28, 2013
@pencilcheck
Copy link
Collaborator

I guess that could be fixed by caching the mapping results and discovery results properly and make sure deploy is using those results to deploy.

@wycc
Copy link
Collaborator Author

wycc commented Aug 30, 2013

You need to test it by yourself. The issue is in the UI. When we do the
second deployment. All messages are shown immediately even the actions is
not executed yet. This must be something wrong in the message display
system.

2013/8/31 Penn Su notifications@github.com

I guess that could be fixed by caching the mapping results and discovery
results properly and make sure deploy is using those results to deploy.


Reply to this email directly or view it on GitHubhttps://github.com//issues/4#issuecomment-23587332
.

@pencilcheck
Copy link
Collaborator

I'm leaving some records here so later people can come back and understand how and what we were doing.

Ok, if that's the issue, then probably because I didn't reset the deploy messages so when it is deployed it just shows all previous deploy log.

@wycc
Copy link
Collaborator Author

wycc commented Aug 31, 2013

I believe that this is the case. I remember that you implement a new status
report system. Can you prepare a document to explain that? How does the new
system avoid the state machine issue in the old system.

2013/8/31 Penn Su notifications@github.com

I'm leaving some records here so later people can come back and understand
how and what we were doing.

Ok, if that's the issue, then probably because I didn't reset the deploy
messages so when it is deployed it just shows all previous deploy log.


Reply to this email directly or view it on GitHubhttps://github.com//issues/4#issuecomment-23601426
.

@pencilcheck
Copy link
Collaborator

I will just write it here.
Basically I have instance variables such as deploy_status and mapping_status and deploy_ops in WuApplication to contain deploy and mapping log. deploy_ops is for giving control to the DOM element, such as closing the dialog.

The javascript will constantly poll for the log and display on the page. That's it.

@wycc
Copy link
Collaborator Author

wycc commented Aug 31, 2013

So, in every polling, we will return the whole log instead of the latest
item. Is it?

2013/8/31 Penn Su notifications@github.com

I will just write it here.
Basically I have instance variables such as deploy_status and
mapping_status and deploy_ops in WuApplication to contain deploy and
mapping log. deploy_ops is for giving control to the DOM element, such as
closing the dialog.

The javascript will constantly poll for the log and display on the page.
That's it.


Reply to this email directly or view it on GitHubhttps://github.com//issues/4#issuecomment-23604561
.

@pencilcheck
Copy link
Collaborator

It just pulls all logs at once yes.

@wycc
Copy link
Collaborator Author

wycc commented Nov 8, 2013

I don't think that this is solved already. I have not really understand the reason yet. However, it must be in the polling API. In the second deployment, the polling is stopped easier.

I can use the following patch to solve this issue. It looks like a timing issue. Please figure out the reason and fix it.

diff --git a/wukong/master/static/js/deployment.js b/wukong/master/static/js/deployment.js
index 8676fb2..533f343 100644
--- a/wukong/master/static/js/deployment.js
+++ b/wukong/master/static/js/deployment.js
@@ -65,6 +65,7 @@ $(function() {
     $('a#deploy-btn').click(function(e) {
         e.preventDefault();
         $(this).tab('show');
+               $('#deploy-progress').html('Start Deploy....');
         $.post('/applications/' + current_application + '/deploy', function(data) {
             // Already an object
             console.log('deploy signal set');
@@ -73,7 +74,9 @@ $(function() {
             } else {
                 // Print deploy status to #deploy-progress
                 // Starts a new polling to deploy-progress
-                application_polling(current_application, '#deploy-progress', 'deploy_status');
+                               setTimeout(function() {
+                       application_polling(current_application, '#deploy-progress', 'deploy_status');
+                               },3000);
                 //$('#deploy_results').dialog({modal: true, autoOpen: true, width: 600, height: 300}).dialog('open').bind('dialogclose', function(event, ui) {
                     //$('#deploy_results').dialog("close");

@nielsreijers
Copy link
Collaborator

Not sure if it's related, but I had a similar problem when generating the
VM. First time I see the whole compilation process, but if I try a second
time, it just shows "build start" or something similar.
It works again after refreshing the page in my browser.

On Fri, Nov 8, 2013 at 10:47 AM, Yu-Chung Wang notifications@github.comwrote:

I don't think that this is solved already. I have not really understand
the reason yet. However, it must be in the polling API. In the second
deployment, the polling is stopped easier.

I can use the following patch to solve this issue. It looks like a timing
issue. Please figure out the reason and fix it.

diff --git a/wukong/master/static/js/deployment.js b/wukong/master/static/js/deployment.js
index 8676fb2..533f343 100644
--- a/wukong/master/static/js/deployment.js
+++ b/wukong/master/static/js/deployment.js
@@ -65,6 +65,7 @@ $(function() {
$('a#deploy-btn').click(function(e) {
e.preventDefault();
$(this).tab('show');

  •           $('#deploy-progress').html('Start Deploy....');
     $.post('/applications/' + current_application + '/deploy', function(data) {
         // Already an object
         console.log('deploy signal set');
    
    @@ -73,7 +74,9 @@ $(function() {
    } else {
    // Print deploy status to #deploy-progress
    // Starts a new polling to deploy-progress
  •            application_polling(current_application, '#deploy-progress', 'deploy_status');
    
  •                           setTimeout(function() {
    
  •                   application_polling(current_application, '#deploy-progress', 'deploy_status');
    
  •                           },3000);
             //$('#deploy_results').dialog({modal: true, autoOpen: true, width: 600, height: 300}).dialog('open').bind('dialogclose', function(event, ui) {
                 //$('#deploy_results').dialog("close");
    


Reply to this email directly or view it on GitHubhttps://github.com//issues/4#issuecomment-28029218
.

_

@wycc
Copy link
Collaborator Author

wycc commented Nov 8, 2013

It should be different issue. This issue is due to the data.ops is still
equal to 'c' for unknown reason. After I add the setTimeout to delay the
polling function, it works well. I believe that it should be some issue
related to the tasklet in the Master.

The Generate VM do not use the data.ops to stop the polling. We should use
it in the Generate VM as well to indictae the state of the building process
in the future.

In addition, we should parse the ant result and put better data.ops to
indicate the building/compiling/deployment progress. For now, we only use
'c' to indicate the end of the process. We should move the state machine
from the UI to the Master which has knowkledge to do better job. The UI
only display UI according to the latest data in the poll function and
display the log one by one.

2013/11/8 Niels Reijers notifications@github.com

Not sure if it's related, but I had a similar problem when generating the
VM. First time I see the whole compilation process, but if I try a second
time, it just shows "build start" or something similar.
It works again after refreshing the page in my browser.

On Fri, Nov 8, 2013 at 10:47 AM, Yu-Chung Wang notifications@github.comwrote:

I don't think that this is solved already. I have not really understand
the reason yet. However, it must be in the polling API. In the second
deployment, the polling is stopped easier.

I can use the following patch to solve this issue. It looks like a
timing
issue. Please figure out the reason and fix it.

diff --git a/wukong/master/static/js/deployment.js
b/wukong/master/static/js/deployment.js
index 8676fb2..533f343 100644
--- a/wukong/master/static/js/deployment.js
+++ b/wukong/master/static/js/deployment.js
@@ -65,6 +65,7 @@ $(function() {
$('a#deploy-btn').click(function(e) {
e.preventDefault();
$(this).tab('show');

  • $('#deploy-progress').html('Start Deploy....');
    $.post('/applications/' + current_application + '/deploy',
    function(data) {
    // Already an object
    console.log('deploy signal set');
    @@ -73,7 +74,9 @@ $(function() {
    } else {
    // Print deploy status to #deploy-progress
    // Starts a new polling to deploy-progress
  • application_polling(current_application, '#deploy-progress',
    'deploy_status');
  • setTimeout(function() {
  • application_polling(current_application, '#deploy-progress',
    'deploy_status');
  • },3000);
    //$('#deploy_results').dialog({modal: true, autoOpen: true, width: 600,
    height: 300}).dialog('open').bind('dialogclose', function(event, ui) {
    //$('#deploy_results').dialog("close");


Reply to this email directly or view it on GitHub<
https://github.com/wukong-m2m/wukong-darjeeling/issues/4#issuecomment-28029218>

.

_


Reply to this email directly or view it on GitHubhttps://github.com//issues/4#issuecomment-28035323
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants