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

FISH-9502: adding validation to skip deploy on target #6901

Conversation

breakponchito
Copy link
Contributor

@breakponchito breakponchito commented Aug 20, 2024

Adding validation to skip deploy on target, when not needed

Description

This is to fix a reported issue where an application is deployed on the server instead of only deploy on the instance that was defined from the beginning

Important Info

Blockers

Testing

New tests

Testing Performed

Manual testing by deploying multiple applications on different instances and then stop and restart to validate if only the applications are deployed on the instances and not the server:

Follow the steps described on the ticket, here details: https://payara.atlassian.net/browse/FISH-9502
applications attached here:
Reproducers.zip
for the steps described on the ticket use the following file: clusterjsp.war

then create other two instances and deploy the following applications:

  1. simpleRest.war
  2. Jakarta10Refresher-1.0-SNAPSHOT.war

At the end you will have the following deployments:

  • instance1 -> clusterjsp.war
  • instance2 -> simpleRest.war
  • instance3 -> Jakarta10Refresher-1.0-SNAPSHOT.war

image

then stop the server: asadmin stop-domain

check each application on the specific instances:

instance1: http://localhost:28080/clusterjsp/
image

instance2: http://localhost:28081/simpleRest/test/rest
image

instance3: http://localhost:28082/Jakarta10Refresher-1.0-SNAPSHOT/faces/index.xhtml
image

then restart server and try to call each application using port 8080, you will see error page, that means applications weren't deployed on the server instance:

image

image

image

and from logs you will see just the loading application message but for the server now those are not initialized

`
[#|2024-08-21T21:33:21.578-0600|INFO|Payara 6.2024.9|javax.enterprise.system.core|_ThreadID=45;_ThreadName=RunLevelControllerThread-1724297596011;_TimeMillis=1724297601578;_LevelValue=800;_MessageID=NCLS-CORE-00022;|
Loading application clusterjsp done in 2,168 ms|#]

[#|2024-08-21T21:33:21.930-0600|INFO|Payara 6.2024.9|javax.enterprise.system.core|_ThreadID=45;_ThreadName=RunLevelControllerThread-1724297596011;_TimeMillis=1724297601930;_LevelValue=800;|
No deployment transformer implementation found.|#]

[#|2024-08-21T21:33:22.017-0600|INFO|Payara 6.2024.9|javax.enterprise.system.core|_ThreadID=45;_ThreadName=RunLevelControllerThread-1724297596011;_TimeMillis=1724297602017;_LevelValue=800;_MessageID=NCLS-CORE-00022;|
Loading application simpleRest done in 437 ms|#]

[#|2024-08-21T21:33:22.213-0600|INFO|Payara 6.2024.9|javax.enterprise.system.core|_ThreadID=45;_ThreadName=RunLevelControllerThread-1724297596011;_TimeMillis=1724297602213;_LevelValue=800;|
No deployment transformer implementation found.|#]

[#|2024-08-21T21:33:22.317-0600|INFO|Payara 6.2024.9|org.jboss.weld.Version|_ThreadID=45;_ThreadName=RunLevelControllerThread-1724297596011;_TimeMillis=1724297602317;_LevelValue=800;|
WELD-000900: 5.0.1 (Final)|#]

[#|2024-08-21T21:33:24.129-0600|INFO|Payara 6.2024.9|fish.payara.micro.cdi.extension.ClusteredCDIEventBusImpl|_ThreadID=45;_ThreadName=RunLevelControllerThread-1724297596011;_TimeMillis=1724297604129;_LevelValue=800;|
Clustered CDI Event bus initialized|#]

[#|2024-08-21T21:33:24.141-0600|INFO|Payara 6.2024.9|javax.enterprise.system.core|_ThreadID=45;_ThreadName=RunLevelControllerThread-1724297596011;_TimeMillis=1724297604141;_LevelValue=800;_MessageID=NCLS-CORE-00022;|
Loading application Jakarta10Refresher-1.0-SNAPSHOT done in 2,121 ms|#]

[#|2024-08-21T21:33:24.200-0600|INFO|Payara 6.2024.9|javax.enterprise.system.core|_ThreadID=46;_ThreadName=RunLevelControllerThread-1724297596017;_TimeMillis=1724297604200;_LevelValue=800;_MessageID=NCLS-CORE-00101;|
Network Listener JMS_PROXY_default_JMS_host started in: 2ms - bound to [/0.0.0.0:7676]|#]
`

for testing also review section for modules and components:

image

image

image

include for testing deployment on deployment groups and cluster:

for deployment groups create a new group, add an instance and start, then deploy the application: clusterjsp.war
image
image
test the application on port: 28080 and 8080
image
8080 is not working this is expected behavior:
image

stop deployment group and restart server. Again test application o both ports and both will show error:
image
image

start again the deployment group, test application on port 28080, you will see the application up and running only on port 28080
image

Make the same test for cluster,

create a cluster with one instance and deploy the application: simpleRest.war

image

test application on ports: 28081 and 8080:
image

image
8080 is not working this is expected behavior:
image

stop cluster and restart server. Again test application o both ports and both will show error:
image

image

start again the cluster, test application on port 28081, you will see the application up and running only on port 28081

image

Testing Environment

ubuntu 20.04, azul jdk 11, maven 3.8.6

Documentation

Notes for Reviewers

@breakponchito
Copy link
Contributor Author

Jenkins test please

@breakponchito breakponchito added the PR: DO NOT MERGE Don't merge PR until further notice label Aug 20, 2024
@breakponchito breakponchito changed the title FISH-9502: adding validation to skip deploy on target if that is not … FISH-9502: adding validation to skip deploy on target Aug 20, 2024
@breakponchito breakponchito removed the PR: DO NOT MERGE Don't merge PR until further notice label Aug 20, 2024
Copy link
Member

@Pandrex247 Pandrex247 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reintroduces FISH-6659

  • Start Payara Server
  • Create and start an instance
  • Deploy clusterjsp to the instance
  • Observe Modules and Components with entries
  • Restart the server (DAS)
  • The Modules and Components table will be empty.

@breakponchito
Copy link
Contributor Author

Jenkins test please

@breakponchito
Copy link
Contributor Author

Jenkins test please

@breakponchito
Copy link
Contributor Author

issue fixed for Modules and Components entries section

@breakponchito
Copy link
Contributor Author

Jenkins test please

1 similar comment
@breakponchito
Copy link
Contributor Author

Jenkins test please

@breakponchito
Copy link
Contributor Author

Jenkins test please

1 similar comment
@breakponchito
Copy link
Contributor Author

Jenkins test please

Copy link
Member

@Pandrex247 Pandrex247 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to break redeployments for deployment groups.

  • Start Payara Server
  • Create a Deployment Group
  • Create an Instance and add it to the deployment group
  • Start the instance
  • Deploy clusterjsp with the Deployment Group as its only target
  • Application gets deployed and is accessible on the instance
  • Restart the instance/deployment group
  • Application doesn't get redeployed.

@breakponchito
Copy link
Contributor Author

Jenkins test please

@breakponchito
Copy link
Contributor Author

Jenkins test please

@breakponchito
Copy link
Contributor Author

This seems to break redeployments for deployment groups.

  • Start Payara Server
  • Create a Deployment Group
  • Create an Instance and add it to the deployment group
  • Start the instance
  • Deploy clusterjsp with the Deployment Group as its only target
  • Application gets deployed and is accessible on the instance
  • Restart the instance/deployment group
  • Application doesn't get redeployed.

issue for deployment groups and clusters already fixed

@breakponchito breakponchito merged commit a65d52d into payara:main Aug 29, 2024
1 check passed
Pandrex247 pushed a commit to Pandrex247/Payara that referenced this pull request Sep 16, 2024
…geted-app-deployment-instance

FISH-9502: adding validation to skip deploy on target
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

Successfully merging this pull request may close these issues.

3 participants