Skip to content

Conversation

SudharmaJain
Copy link
Contributor

The thread pool was hardcoded to use 8 threads,
com.cloud.template.TemplateManagerImpl.configure(String, Map<String, Object>):
_preloadExecutor = Executors.newFixedThreadPool(8, new NamedThreadFactory("Template-Preloader"));

Added the change to pick threadpool size from configuration.

@asfbot
Copy link

asfbot commented Sep 24, 2015

cloudstack-pull-rats #713 SUCCESS
This pull request looks good

@asfbot
Copy link

asfbot commented Sep 24, 2015

cloudstack-pull-analysis #663 SUCCESS
This pull request looks good

@asfbot
Copy link

asfbot commented Sep 28, 2015

cloudstack-pull-rats #752 SUCCESS
This pull request looks good

@asfbot
Copy link

asfbot commented Sep 28, 2015

cloudstack-pull-analysis #703 SUCCESS
This pull request looks good

SSVMPSK("Hidden", ManagementServer.class, String.class, "upload.post.secret.key", "", "PSK with SSVM", null);
SSVMPSK("Hidden", ManagementServer.class, String.class, "upload.post.secret.key", "", "PSK with SSVM", null),

TemplatePreloaderPoolSize("Advanced", TemplateManager.class, Integer.class, "template.preloader.pool.size", "8", "Size of the TemplateManager threadpool", null);
Copy link
Contributor

Choose a reason for hiding this comment

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

Use the mechanism described here to add a new configuration. https://cwiki.apache.org/confluence/display/CLOUDSTACK/Configuration.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@koushik-das, changed the mechanism to use configuration.

@asfbot
Copy link

asfbot commented Sep 28, 2015

cloudstack-pull-rats #760 SUCCESS
This pull request looks good

@asfbot
Copy link

asfbot commented Sep 28, 2015

cloudstack-pull-analysis #711 SUCCESS
This pull request looks good

@@ -278,6 +278,8 @@
@Inject
private EndPointSelector selector;

protected final ConfigKey<Integer> TemplatePreloaderPoolSize = new ConfigKey<Integer>("Advanced", Integer.class, "template.preloader.pool.size", "8", "Size of the TemplateManager threadpool", false);
Copy link
Contributor

Choose a reason for hiding this comment

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

@SudharmaJain You have to implement the Configurable interface. Check for its usage in code.

@asfbot
Copy link

asfbot commented Sep 30, 2015

cloudstack-pull-rats #772 SUCCESS
This pull request looks good

@asfbot
Copy link

asfbot commented Sep 30, 2015

cloudstack-pull-analysis #724 SUCCESS
This pull request looks good

@@ -413,3 +413,4 @@ CREATE TABLE `cloud`.`ldap_trust_map` (
UNIQUE KEY `uk_ldap_trust_map__domain_id` (`domain_id`),
CONSTRAINT `fk_ldap_trust_map__domain_id` FOREIGN KEY (`domain_id`) REFERENCES `domain` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

Copy link
Member

Choose a reason for hiding this comment

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

Please remove this empty line.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed the empty line.

@rohityadavcloud
Copy link
Member

LGTM.

@SudharmaJain
Copy link
Contributor Author

Rebased against master.

@rohityadavcloud
Copy link
Member

Thanks @SudharmaJain LGTM (just code review), can you do a push -f (travis job failed for some reason)

@SudharmaJain
Copy link
Contributor Author

@bhaisaab I pushed it again.

@rohityadavcloud
Copy link
Member

LGTM

tag:easypr

Cc @swill

@swill
Copy link
Contributor

swill commented May 2, 2016

We need another code review. How should I test this, does it have to be a manual test?

@koushik-das
Copy link
Contributor

LGTM. Verified that a configuration entry is added with default 8 as pool size. Increased the default threadpool size, restarted MS and verified that when multiple prepareTemplate APIs are invoked required number of threads gets created.

INFO c.c.t.TemplateManagerImpl (logid:49186ba8) Start to preload template 201 into primary storage 2
INFO c.c.t.TemplateManagerImpl (logid:1ea23b56) Start to preload template 201 into primary storage 3

@koushik-das
Copy link
Contributor

@swill This has the required LGTMs.

@swill
Copy link
Contributor

swill commented May 9, 2016

Thanks @koushik-das. I will run this through CI just to be sure everything is good... Thx.

@swill
Copy link
Contributor

swill commented May 11, 2016

CI RESULTS

Tests Run: 85
  Skipped: 0
   Failed: 3
   Errors: 0
 Duration: 6h 24m 57s

Summary of the problem(s):

FAIL: Test redundant router internals
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/data/git/cs1/cloudstack/test/integration/smoke/test_routers_network_ops.py", line 483, in test_02_RVR_Network_FW_PF_SSH_default_routes_egress_false
    "Attempt to retrieve google.com index page should be successful once rule is added!"
AssertionError: Attempt to retrieve google.com index page should be successful once rule is added!
----------------------------------------------------------------------
Additional details in: /tmp/MarvinLogs/test_network_GDLRM8/results.txt
FAIL: test_02_vpc_privategw_static_routes (integration.smoke.test_privategw_acl.TestPrivateGwACL)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/data/git/cs1/cloudstack/test/integration/smoke/test_privategw_acl.py", line 253, in test_02_vpc_privategw_static_routes
    self.performVPCTests(vpc_off)
  File "/data/git/cs1/cloudstack/test/integration/smoke/test_privategw_acl.py", line 324, in performVPCTests
    self.check_pvt_gw_connectivity(vm1, public_ip_1, vm2.nic[0].ipaddress)
  File "/data/git/cs1/cloudstack/test/integration/smoke/test_privategw_acl.py", line 559, in check_pvt_gw_connectivity
    "Ping to outside world from VM should be successful"
AssertionError: Ping to outside world from VM should be successful
----------------------------------------------------------------------
Additional details in: /tmp/MarvinLogs/test_network_GDLRM8/results.txt
FAIL: test_03_vpc_privategw_restart_vpc_cleanup (integration.smoke.test_privategw_acl.TestPrivateGwACL)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/data/git/cs1/cloudstack/test/integration/smoke/test_privategw_acl.py", line 265, in test_03_vpc_privategw_restart_vpc_cleanup
    self.performVPCTests(vpc_off, True)
  File "/data/git/cs1/cloudstack/test/integration/smoke/test_privategw_acl.py", line 331, in performVPCTests
    self.check_pvt_gw_connectivity(vm1, public_ip_1, vm2.nic[0].ipaddress)
  File "/data/git/cs1/cloudstack/test/integration/smoke/test_privategw_acl.py", line 559, in check_pvt_gw_connectivity
    "Ping to outside world from VM should be successful"
AssertionError: Ping to outside world from VM should be successful
----------------------------------------------------------------------
Additional details in: /tmp/MarvinLogs/test_network_GDLRM8/results.txt

Associated Uploads

/tmp/MarvinLogs/DeployDataCenter__May_10_2016_19_39_49_I0OP3U:

/tmp/MarvinLogs/test_network_GDLRM8:

/tmp/MarvinLogs/test_vpc_routers_WTWRQD:

Uploads will be available until 2016-07-11 02:00:00 +0200 CEST

Comment created by upr comment.

@swill
Copy link
Contributor

swill commented May 11, 2016

These connectivity issues are unrelated to this PR. I will merge this now...

@asfgit asfgit merged commit 93ce108 into apache:master May 11, 2016
asfgit pushed a commit that referenced this pull request May 11, 2016
CLOUDSTACK-8901: PrepareTemplate job thread hard-coded to max 8 threads The thread pool was hardcoded to use 8 threads,
com.cloud.template.TemplateManagerImpl.configure(String, Map<String, Object>):
_preloadExecutor = Executors.newFixedThreadPool(8, new NamedThreadFactory("Template-Preloader"));

Added the change to pick threadpool size from configuration.

* pr/880:
  CLOUDSTACK-8901: PrepareTemplate job thread hard-coded to max 8 threads

Signed-off-by: Will Stevens <williamstevens@gmail.com>
@SudharmaJain SudharmaJain deleted the cs-8901 branch May 17, 2016 04:18
rohityadavcloud pushed a commit that referenced this pull request Jan 20, 2021
Co-authored-by: Pearl Dsilva <pearl.dsilva@shapeblue.com>
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
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.

6 participants