A secure way to reset VMs password

2014-11-27 Thread Alireza Eskandari
HiI viewed the bash script that resets Linux password 
(http://download.cloud.com/templates/4.2/bindir/cloud-set-guest-password.in)It 
seems that it doesn't use a secure way for transferring password string to 
instance.Instances on a shared network can sniff password requests and export 
requested password of other instances.I suggest to use SSL (https) instead of 
plan text.Regards



Re: A secure way to reset VMs password

2014-11-27 Thread Alireza Eskandari
Lucian, I send email here to see developers opinion about this issue and 
discuss about it.I'll open a jira ticket about it soon.Thanks for your +1 :)
  From: Nux! n...@li.nux.ro
 To: dev@cloudstack.apache.org; Alireza Eskandari astro.alir...@yahoo.com 
 Sent: Thursday, November 27, 2014 7:58 PM
 Subject: Re: A secure way to reset VMs password
   
+1 on this, Alireza I think it would be best if you submitted a bug in 
https://issues.apache.org/jira/

--
Sent from the Delta quadrant using Borg technology!

Nux!
www.nux.ro   

time zones

2014-12-02 Thread Alireza Eskandari
Hi,Does CloudStack accepted time zones limited to list 
below?http://docs.cloudstack.apache.org/en/latest/dev.html?highlight=time%20zones#time-zones
Is it possible to use different time zone outside of the above list?Thanks


Re: time zones

2014-12-02 Thread Alireza Eskandari
Francois, you are right but unfortunately our time zone isn't standard. We use 
+3.5 (+4.5 with DST)Thanks

   

Re: A secure way to reset VMs password

2014-12-02 Thread Alireza Eskandari
A stupid question!
I can't find the source of windows version of password manager! Where is it?

Sent from Samsung Mobile.

div Original message /divdivFrom: Chiradeep Vittal 
chiradeep.vit...@citrix.com /divdivDate:03/12/2014  02:05  (GMT+03:30) 
/divdivTo: dev@cloudstack.apache.org /divdivSubject: Re: A secure way 
to reset VMs password /divdiv
/divYou would need client-side certs as well since the password server needs 
to be able to validate WHO is asking for the password. Currently it is based on 
the client's IP address.
Also the current scheme is a single-use password — as soon as the password is 
retrieved, it is not available to anybody else (of course a MITM could sniff 
the first exchange).

You could eliminate a lot of MITM-style attacks by running the password server 
locally on each hypervisor (hard for VMW), or by attaching an ISO (containing 
the password) to the VM.

From: John Kinsella j...@stratosec.comailto:j...@stratosec.co
Reply-To: dev@cloudstack.apache.orgmailto:dev@cloudstack.apache.org 
dev@cloudstack.apache.orgmailto:dev@cloudstack.apache.org
Date: Tuesday, December 2, 2014 at 1:32 PM
To: dev@cloudstack.apache.orgmailto:dev@cloudstack.apache.org 
dev@cloudstack.apache.orgmailto:dev@cloudstack.apache.org
Subject: Re: A secure way to reset VMs password

That password reset infrastructure has bigger issues than just SSL. The server 
side works, but that’s about all I can say for it. This topic comes up every 
6-12 months. :)

I thought there was a Jira entry but I can’t find it…personally I’d love to see 
the client and server sides both rewritten from scratch.

John

On Nov 28, 2014, at 11:33 AM, Nux! n...@li.nux.romailto:n...@li.nux.ro 
wrote:
Jayapal,
Not necesarily, one could run stunnel or nginx as SSL proxy on some other port 
(8443?), this way SSL and non-SSL connections will still work and give you 
plenty of time to update your templates, if you so wish.
Am I missing any important bits here?
Lucian
--
Sent from the Delta quadrant using Borg technology!
Nux!
www.nux.ro
- Original Message -
From: Jayapal Reddy Uradi 
jayapalreddy.ur...@citrix.commailto:jayapalreddy.ur...@citrix.com
To: dev@cloudstack.apache.orgmailto:dev@cloudstack.apache.org 
dev@cloudstack.apache.orgmailto:dev@cloudstack.apache.org
Cc: Alireza Eskandari 
astro.alir...@yahoo.commailto:astro.alir...@yahoo.com
Sent: Friday, 28 November, 2014 09:34:02
Subject: Re: A secure way to reset VMs password
Another point to note is all the vms in production has to update
with the new cloud-set-guest-password scripts because of the new password reset
method.
Thanks,
Jayapal
On 28-Nov-2014, at 2:28 PM, Erik Weber 
terbol...@gmail.commailto:terbol...@gmail.com
wrote:
On Thu, Nov 27, 2014 at 3:54 PM, Alireza Eskandari 
astro.alir...@yahoo.com.invalidmailto:astro.alir...@yahoo.com.invalid wrote:
HiI viewed the bash script that resets Linux password (
http://download.cloud.com/templates/4.2/bindir/cloud-set-guest-password.in)It
seems that it doesn't use a secure way for transferring password string to
instance.Instances on a shared network can sniff password requests and
export requested password of other instances.I suggest to use SSL (https)
instead of plan text.Regards
I like the idea, but there's a couple of obstacles to overcome, namely
which SSL certificates to use.
- certificates need a subject name, ie. IP or hostname for web pages, you
could solve this by making the mgmt server a CA and have each VR get a
signed certificate by it, but it's complicated
- if the community bundle a pre generated certificate it is commonly known
and not to be trusted, also not sure how to handle subject name
- assuming everyone to supply a valid certificate is quite complicated (CA
must be on VR etc), and makes it considerably harder to get a working setup
- using self signed causes issues with validation
Don't get me wrong, I love the idea, but it's not just to flip a switch and
have (proper) SSL in place.
--
Erik




Re: A secure way to reset VMs password

2014-12-02 Thread Alireza Eskandari
John, +1If we provide password reset capability it should be secure, if not it 
is better to make it disable at all.About source of windows version, so what 
did we do? Should we write it from scratch? Why it isn't open?I open a jira 
ticket, if you have any comment or suggestion please write 
there.https://issues.apache.org/jira/browse/CLOUDSTACK-8009
Thanks
  From: John Kinsella j...@stratosec.co
 To: dev@cloudstack.apache.org dev@cloudstack.apache.org 
 Sent: Wednesday, December 3, 2014 9:18 AM
 Subject: Re: A secure way to reset VMs password
   
It's not our place to enforce how users authenticate to their VMs. We provide 
flexible options, suggest best practices, and let them use the tool as best 
suits their needs.

Excuse any typos - sent from mobile device



 On Dec 2, 2014, at 21:22, Carlos Reategui create...@gmail.com wrote:
 
 Why do passwords at all?  Why not just use ssh keys like AWS does. The 
 functionality is already there just not in the ACS UI. Cloud-init already 
 supports it which is available in most distros and therefore would not 
 require CS specific scripts. At least not for linux. On windows I'm not 
 exactly sure how AWS does it but I think it is also some kind of terminal 
 services certificates so I think it could be made to work too. 
 
 -Carlos
 
 
 
 On Dec 2, 2014, at 2:35 PM, Chiradeep Vittal chiradeep.vit...@citrix.com 
 wrote:
 
 You would need client-side certs as well since the password server needs to 
 be able to validate WHO is asking for the password. Currently it is based on 
 the client's IP address.
 Also the current scheme is a single-use password — as soon as the password 
 is retrieved, it is not available to anybody else (of course a MITM could 
 sniff the first exchange).
 
 You could eliminate a lot of MITM-style attacks by running the password 
 server locally on each hypervisor (hard for VMW), or by attaching an ISO 
 (containing the password) to the VM.
 
 From: John Kinsella j...@stratosec.comailto:j...@stratosec.co
 Reply-To: dev@cloudstack.apache.orgmailto:dev@cloudstack.apache.org 
 dev@cloudstack.apache.orgmailto:dev@cloudstack.apache.org
 Date: Tuesday, December 2, 2014 at 1:32 PM
 To: dev@cloudstack.apache.orgmailto:dev@cloudstack.apache.org 
 dev@cloudstack.apache.orgmailto:dev@cloudstack.apache.org
 Subject: Re: A secure way to reset VMs password
 
 That password reset infrastructure has bigger issues than just SSL. The 
 server side works, but that’s about all I can say for it. This topic comes 
 up every 6-12 months. :)
 
 I thought there was a Jira entry but I can’t find it…personally I’d love to 
 see the client and server sides both rewritten from scratch.
 
 John
 
 On Nov 28, 2014, at 11:33 AM, Nux! n...@li.nux.romailto:n...@li.nux.ro 
 wrote:
 Jayapal,
 Not necesarily, one could run stunnel or nginx as SSL proxy on some other 
 port (8443?), this way SSL and non-SSL connections will still work and give 
 you plenty of time to update your templates, if you so wish.
 Am I missing any important bits here?
 Lucian
 --
 Sent from the Delta quadrant using Borg technology!
 Nux!
 www.nux.ro
 - Original Message -
 From: Jayapal Reddy Uradi 
 jayapalreddy.ur...@citrix.commailto:jayapalreddy.ur...@citrix.com
 To: dev@cloudstack.apache.orgmailto:dev@cloudstack.apache.org 
 dev@cloudstack.apache.orgmailto:dev@cloudstack.apache.org
 Cc: Alireza Eskandari 
 astro.alir...@yahoo.commailto:astro.alir...@yahoo.com
 Sent: Friday, 28 November, 2014 09:34:02
 Subject: Re: A secure way to reset VMs password
 Another point to note is all the vms in production has to update
 with the new cloud-set-guest-password scripts because of the new password 
 reset
 method.
 Thanks,
 Jayapal
 On 28-Nov-2014, at 2:28 PM, Erik Weber 
 terbol...@gmail.commailto:terbol...@gmail.com
 wrote:
 On Thu, Nov 27, 2014 at 3:54 PM, Alireza Eskandari 
 astro.alir...@yahoo.com.invalidmailto:astro.alir...@yahoo.com.invalid 
 wrote:
 HiI viewed the bash script that resets Linux password (
 http://download.cloud.com/templates/4.2/bindir/cloud-set-guest-password.in)It
 seems that it doesn't use a secure way for transferring password string to
 instance.Instances on a shared network can sniff password requests and
 export requested password of other instances.I suggest to use SSL (https)
 instead of plan text.Regards
 I like the idea, but there's a couple of obstacles to overcome, namely
 which SSL certificates to use.
 - certificates need a subject name, ie. IP or hostname for web pages, you
 could solve this by making the mgmt server a CA and have each VR get a
 signed certificate by it, but it's complicated
 - if the community bundle a pre generated certificate it is commonly known
 and not to be trusted, also not sure how to handle subject name
 - assuming everyone to supply a valid certificate is quite complicated (CA
 must be on VR etc), and makes it considerably harder to get a working setup
 - using self signed causes issues with validation
 Don't get me wrong, I

Re: Any more bugs we should fix in 4.3 branch for 4.3.2?

2014-12-04 Thread Alireza Eskandari
Hi Rohit,Thank you and your friends for working on CloudStack.I saw release 
note with lots of bugfixes that makes 4.3.2 a reliable release.I open a new 
jira ticket about a UI problem.CLOUDSTACK-8019Also I'm looking for good news 
about CLOUDSTACK-5696 :)Regards,Alireza


Re: A secure way to reset VMs password

2014-12-04 Thread Alireza Eskandari
It is possible if we provide password service on port 8080 with current 
insecure method and on port 8443 with secure method.
with this solution we can use both old and new password reset service.

 Original message 
From: Logan Barfield lbarfi...@tqhosting.com 
Date: 03/12/2014  19:32  (GMT+03:30) 
To: dev@cloudstack.apache.org 
Subject: Re: A secure way to reset VMs password 
 
Passwords are most definitely a necessity, but not having SSH Keys in the
GUI at this point just doesn't make any sense.

To clarify my thoughts on the current password system: I think a re-write
would be great, but it should include an insecure/legacy option (probably
as a global setting) that would continue to function with the current reset
scripts.


Thank You,

Logan Barfield
Tranquil Hosting

On Wed, Dec 3, 2014 at 10:55 AM, Andrija Panic andrija.pa...@gmail.com
wrote:

 +1 what Nux said - I'm aware of many web developers NOT knowing what the
 SSH keys are at all, and thus not using them... most of them relly on
 passwords... but nice to have ssh keys for rest of us.

 On 3 December 2014 at 16:52, Nux! n...@li.nux.ro wrote:

  Keys are not for everyone. Passwords are still used a lot.
 
  --
  Sent from the Delta quadrant using Borg technology!
 
  Nux!
  www.nux.ro
 
  - Original Message -
   From: Carlos Reategui create...@gmail.com
   To: dev@cloudstack.apache.org
   Sent: Wednesday, 3 December, 2014 05:19:07
   Subject: Re: A secure way to reset VMs password
 
   Why do passwords at all?  Why not just use ssh keys like AWS does. The
   functionality is already there just not in the ACS UI. Cloud-init
 already
   supports it which is available in most distros and therefore would not
  require
   CS specific scripts. At least not for linux. On windows I'm not exactly
  sure
   how AWS does it but I think it is also some kind of terminal services
   certificates so I think it could be made to work too.
  
   -Carlos
  
  
  
   On Dec 2, 2014, at 2:35 PM, Chiradeep Vittal 
  chiradeep.vit...@citrix.com
   wrote:
  
   You would need client-side certs as well since the password server
  needs to be
   able to validate WHO is asking for the password. Currently it is based
  on the
   client's IP address.
   Also the current scheme is a single-use password — as soon as the
  password is
   retrieved, it is not available to anybody else (of course a MITM could
  sniff
   the first exchange).
  
   You could eliminate a lot of MITM-style attacks by running the
 password
  server
   locally on each hypervisor (hard for VMW), or by attaching an ISO
  (containing
   the password) to the VM.
  
   From: John Kinsella j...@stratosec.comailto:j...@stratosec.co
   Reply-To: dev@cloudstack.apache.orgmailto:dev@cloudstack.apache.org
 
   dev@cloudstack.apache.orgmailto:dev@cloudstack.apache.org
   Date: Tuesday, December 2, 2014 at 1:32 PM
   To: dev@cloudstack.apache.orgmailto:dev@cloudstack.apache.org
   dev@cloudstack.apache.orgmailto:dev@cloudstack.apache.org
   Subject: Re: A secure way to reset VMs password
  
   That password reset infrastructure has bigger issues than just SSL.
 The
  server
   side works, but that’s about all I can say for it. This topic comes up
  every
   6-12 months. :)
  
   I thought there was a Jira entry but I can’t find it…personally I’d
  love to see
   the client and server sides both rewritten from scratch.
  
   John
  
   On Nov 28, 2014, at 11:33 AM, Nux! n...@li.nux.romailto:
 n...@li.nux.ro
  wrote:
   Jayapal,
   Not necesarily, one could run stunnel or nginx as SSL proxy on some
  other port
   (8443?), this way SSL and non-SSL connections will still work and give
  you
   plenty of time to update your templates, if you so wish.
   Am I missing any important bits here?
   Lucian
   --
   Sent from the Delta quadrant using Borg technology!
   Nux!
   www.nux.ro
   - Original Message -
   From: Jayapal Reddy Uradi
   jayapalreddy.ur...@citrix.commailto:jayapalreddy.ur...@citrix.com
   To: dev@cloudstack.apache.orgmailto:dev@cloudstack.apache.org
   dev@cloudstack.apache.orgmailto:dev@cloudstack.apache.org
   Cc: Alireza Eskandari
   astro.alir...@yahoo.commailto:astro.alir...@yahoo.com
   Sent: Friday, 28 November, 2014 09:34:02
   Subject: Re: A secure way to reset VMs password
   Another point to note is all the vms in production has to update
   with the new cloud-set-guest-password scripts because of the new
  password reset
   method.
   Thanks,
   Jayapal
   On 28-Nov-2014, at 2:28 PM, Erik Weber
   terbol...@gmail.commailto:terbol...@gmail.com
   wrote:
   On Thu, Nov 27, 2014 at 3:54 PM, Alireza Eskandari 
   astro.alir...@yahoo.com.invalidmailto:
 astro.alir...@yahoo.com.invalid
  wrote:
   HiI viewed the bash script that resets Linux password (
  
 
 http://download.cloud.com/templates/4.2/bindir/cloud-set-guest-password.in)It
   seems that it doesn't use a secure way for transferring password
 string
  to
   instance.Instances on a shared network can

remove a not existing VM

2014-12-13 Thread Alireza Eskandari
HiI can't remove an instance from CS that doesn't exist in hypervisor and 
deleted already.Do you have any idea?Thanks

Re: [ANNOUNCE] New committer: Erik Weber (terbolous)

2014-12-13 Thread Alireza Eskandari
Congratulations Erik!
  From: Pierre-Luc Dion pdion...@apache.org
 To: dev@cloudstack.apache.org 
 Sent: Saturday, December 13, 2014 8:33 PM
 Subject: [ANNOUNCE] New committer: Erik Weber (terbolous)
   
The Project Management Committee (PMC) for Apache CloudStack
has asked Erik Weber to become a committer and we are pleased to
announce that they have accepted.

Erik is doing a great job on helping the community thru the mailing list.
He helped a lot on testing and troubleshooting new releases of CloudStack
as well as contributing to the documentation. Thanks Erik and Congrat!


Being a committer allows many contributors to contribute more
autonomously. For developers, it makes it easier to submit changes and
eliminates the need to have contributions reviewed via the patch
submission process. Whether contributions are development-related or
otherwise, it is a recognition of a contributor's participation in the
project and commitment to the project and the Apache Way.

Please join me in congratulating Erik

Pierre-Luc
on behalf of the CloudStack PMC


   

Re: remove a not existing VM

2014-12-15 Thread Alireza Eskandari
Thanks MatthewI set vm state in vm_instance table to Expunging and run expunge 
command from UI successfully.
I notice that I changed state of active snapshots of this instace from 
vm_snapshots table to Expunging and fill removed field.


  From: Matthew Midgett clouds...@trick-solutions.com.INVALID
 To: dev@cloudstack.apache.org 
 Sent: Sunday, December 14, 2014 8:07 PM
 Subject: RE: remove a not existing VM
   
If the vm is not on the hypervisor then set vm_instance to Expunged for that vm 
in MySql. Please next time tell us what version of ACS and hypervisor and 
version. Also logs will help us find your problem. 
/var/log/cloudstack/management/ and the management log and cataylina log are 
important. 


Sent on a Sprint Samsung Galaxy S® III

div Original message /divdivFrom: Alireza Eskandari 
astro.alir...@yahoo.com.INVALID /divdivDate:12/14/2014  2:00 AM  
(GMT-05:00) /divdivTo: dev@cloudstack.apache.org /divdivSubject: remove 
a not existing VM /divdiv
/divHiI can't remove an instance from CS that doesn't exist in hypervisor and 
deleted already.Do you have any idea?Thanks

  

VMware NSX (former Nicira NVP) with Cloudstack and vSphere

2015-05-03 Thread Alireza Eskandari
Hi friends.

You know Nicira NVP was acquired by VMware and released as VMware NSX.
Is it possible to use VMware NSX with Nicira NVP plugin in CloudStack?
If yes, how can I find Transport Zone Uuid and L3 Gateway Service Uuid 
parameters values in NSX?

Regards,
Alireza


vSphere 6 and Cloudstack

2015-05-03 Thread Alireza Eskandari
Hi
I try to create a zone in Cloudstack 4.3.2 with VMware vSphere 6.0 but I get 
this in logs:


2015-05-03 17:12:58,233 DEBUG [c.c.a.ApiServlet] 
(catalina-exec-25:ctx-6413c0cd) ===START===  172.16.9.154 -- POST  
command=addVmwareDcresponse=jsonsessionkey=NdE3B%2BePN77Up7y3O0pyUfpioLE%3D2015-05-03
 17:12:58,308 DEBUG [c.c.h.v.r.VmwareContextFactory] 
(catalina-exec-25:ctx-6413c0cd ctx-9220dabb) initialize VmwareContext. url: 
https://172.16.250.10/sdk/vimService, username: administrator@vsphere.local, 
password: A**
2015-05-03 17:12:58,356 INFO  [c.c.a.ApiServer] (catalina-exec-25:ctx-6413c0cd 
ctx-9220dabb) Failed to add VMware DC to zone due to : null
2015-05-03 17:12:58,357 DEBUG [c.c.a.ApiServlet] (catalina-exec-25:ctx-6413c0cd 
ctx-9220dabb) ===END===  172.16.9.154 -- POST  
command=addVmwareDcresponse=jsonsessionkey=NdE3B%2BePN77Up7y3O0pyUfpioLE%3D


Same VLAN in one zone on different networks

2015-05-08 Thread Alireza Eskandari
Hello everybody, 

It seems that we can't create multiple Guest Networks with same VLAN ID in 
the same zone on different Physical Networks. 
I get this message then I try: 
There is a isolated/shared network with vlan id: VLAN ID  already exists in 
zone Zone ID 
Is it a bug? 
I use CloudStack 4.3.2 

Regards, 
Alireza


Re: VMware NSX (former Nicira NVP) with Cloudstack and vSphere

2015-05-08 Thread Alireza Eskandari
Thanks for answers.
So can we say that VMware nsx-vsphere is not compatible with CloudStack?
Regards

- Original Message -
From: Remi Bergsma rberg...@schubergphilis.com
To: dev@cloudstack.apache.org dev@cloudstack.apache.org
Cc: 
Sent: Tuesday, May 5, 2015 5:19 PM
Subject: Re: VMware NSX (former Nicira NVP) with Cloudstack and vSphere

Interesting, didn’t know that! :-)

 On 05 May 2015, at 14:28, Funs Kessen f...@barred.org wrote:
 
 Hi,
 
 For the record, VMware nsx-mh not VMware nsx-vsphere, as they are different
 products.
 
 Cheers,
 
 Funs
 
 On Tuesday, May 5, 2015, Remi Bergsma rberg...@schubergphilis.com wrote:
 
 Hi Alireza,
 
 Yes, NSX works just fine with CloudStack. We run this in production on
 XenServer and KVM and are currently running 4.4. There’s no reason it
 wouldn’t work in 4.5 as well.
 
 The Transport Zone uuid you get from NSX, either from the UI or the API.
 Same counts for the L3 uuid. We do not use the L3 part, so we left it empty.
 
 From your e-mail I understand you run VMware. I don’t know what versions
 are supported though, never tried it.
 
 Regards,
 Remi
 
 
 On 04 May 2015, at 06:55, Alireza Eskandari
 astro.alir...@yahoo.com.INVALID wrote:
 
 Hi friends.
 
 You know Nicira NVP was acquired by VMware and released as VMware NSX.
 Is it possible to use VMware NSX with Nicira NVP plugin in CloudStack?
 If yes, how can I find Transport Zone Uuid and L3 Gateway Service
 Uuid parameters values in NSX?
 
 Regards,
 Alireza
 



build cloudstack in eclipse

2015-06-02 Thread Alireza Eskandari
Hi 
I try to build build cloudstack 4.4.3 in eclipse. 
I read these docs: 
https://cwiki.apache.org/confluence/display/CLOUDSTACK/Setting+up+a+CloudStack+dev+environment+on+Windows
 
https://cwiki.apache.org/confluence/display/CLOUDSTACK/Using+Eclipse+With+CloudStack
 
I use embedded maven in eclipse that is equivalent to this: 
mvn install -pl developer,systemvm -Dnoredist 

I get this log: 

[INFO]  
[INFO] Building Apache CloudStack apidocs 4.4.3 
[INFO]  
[INFO] 
[INFO] --- maven-checkstyle-plugin:2.11:check (cloudstack-checkstyle) @ 
cloud-apidoc --- 
[INFO] Starting audit... 
Audit done. 

[INFO] 
[INFO] --- maven-remote-resources-plugin:1.3:process (default) @ cloud-apidoc 
--- 
[INFO] 
[INFO] --- exec-maven-plugin:1.2.1:exec (compile) @ cloud-apidoc --- 
2015-06-01 16:38:20,139{GMT} DEBUG [org.reflections.Reflections] (main:) going 
to scan these urls: 
jar:file:/C:/Users/Administrator/workspace/cloudstack/client/target/cloud-client-ui-4.4.3/WEB-INF/lib/cloud-api-4.4.3.jar!/
 
jar:file:/C:/Users/Administrator/workspace/cloudstack/client/target/cloud-client-ui-4.4.3/WEB-INF/lib/cloud-plugin-hypervisor-ucs-4.4.3.jar!/
 
jar:file:/C:/Users/Administrator/workspace/cloudstack/client/target/cloud-client-ui-4.4.3/WEB-INF/lib/cloud-plugin-api-discovery-4.4.3.jar!/
 
jar:file:/C:/Users/Administrator/workspace/cloudstack/client/target/cloud-client-ui-4.4.3/WEB-INF/lib/cloud-plugin-network-ssp-4.4.3.jar!/
 
jar:file:/C:/Users/Administrator/workspace/cloudstack/client/target/cloud-client-ui-4.4.3/WEB-INF/lib/cloud-plugin-api-limit-account-based-4.4.3.jar!/
 
jar:file:/C:/Users/Administrator/workspace/cloudstack/client/target/cloud-client-ui-4.4.3/WEB-INF/lib/cloud-plugin-dedicated-resources-4.4.3.jar!/
 
jar:file:/C:/Users/Administrator/workspace/cloudstack/client/target/cloud-client-ui-4.4.3/WEB-INF/lib/cloud-plugin-user-authenticator-ldap-4.4.3.jar!/
 
jar:file:/C:/Users/Administrator/workspace/cloudstack/client/target/cloud-client-ui-4.4.3/WEB-INF/lib/cloud-plugin-hypervisor-baremetal-4.4.3.jar!/
 
jar:file:/C:/Users/Administrator/workspace/cloudstack/client/target/cloud-client-ui-4.4.3/WEB-INF/lib/cloud-plugin-hypervisor-vmware-4.4.3.jar!/
 

2015-06-01 16:38:20,764{GMT} INFO  [org.reflections.Reflections] (main:) 
Reflections took 625 ms to scan 9 urls, producing 86 keys and 1296 values 
2015-06-01 16:38:21,201{GMT} DEBUG [org.reflections.Reflections] (main:) going 
to scan these urls: 
jar:file:/C:/Users/Administrator/workspace/cloudstack/client/target/cloud-client-ui-4.4.3/WEB-INF/lib/cloud-api-4.4.3.jar!/
 
jar:file:/C:/Users/Administrator/workspace/cloudstack/client/target/cloud-client-ui-4.4.3/WEB-INF/lib/cloud-plugin-network-netscaler-4.4.3.jar!/
 
jar:file:/C:/Users/Administrator/workspace/cloudstack/client/target/cloud-client-ui-4.4.3/WEB-INF/lib/cloud-plugin-network-palo-alto-4.4.3.jar!/
 
jar:file:/C:/Users/Administrator/workspace/cloudstack/client/target/cloud-client-ui-4.4.3/WEB-INF/lib/cloud-plugin-netapp-4.4.3.jar!/
 
jar:file:/C:/Users/Administrator/workspace/cloudstack/client/target/cloud-client-ui-4.4.3/WEB-INF/lib/cloud-plugin-network-cisco-vnmc-4.4.3.jar!/
 
jar:file:/C:/Users/Administrator/workspace/cloudstack/client/target/cloud-client-ui-4.4.3/WEB-INF/lib/cloud-plugin-network-f5-4.4.3.jar!/
 
jar:file:/C:/Users/Administrator/workspace/cloudstack/client/target/cloud-client-ui-4.4.3/WEB-INF/lib/cloud-plugin-network-srx-4.4.3.jar!/
 
jar:file:/C:/Users/Administrator/workspace/cloudstack/client/target/cloud-client-ui-4.4.3/WEB-INF/lib/cloud-plugin-network-nvp-4.4.3.jar!/
 
jar:file:/C:/Users/Administrator/workspace/cloudstack/client/target/cloud-client-ui-4.4.3/WEB-INF/lib/cloud-plugin-hypervisor-vmware-4.4.3.jar!/
 
jar:file:/C:/Users/Administrator/workspace/cloudstack/client/target/cloud-client-ui-4.4.3/WEB-INF/lib/cloud-server-4.4.3.jar!/
 
jar:file:/C:/Users/Administrator/workspace/cloudstack/client/target/cloud-client-ui-4.4.3/WEB-INF/lib/cloud-plugin-network-vns-4.4.3.jar!/
 

2015-06-01 16:38:21,389{GMT} INFO  [org.reflections.Reflections] (main:) 
Reflections took 188 ms to scan 11 urls, producing 57 keys and 361 values 
Check, is this api part of another build profile? Null value for key: 
createOvsElement preProcessedCommand=7 
Check, is this api part of another build profile? Null value for key: 
deleteStratoshereSsp preProcessedCommand=1 
Check, is this api part of another build profile? Null value for key: 
configureSimulator preProcessedCommand=1 
Check, is this api part of another build profile? Null value for key: 
querySimulatorMock preProcessedCommand=1 
Check, is this api part of another build profile? Null value for key: 
cleanupSimulatorMock preProcessedCommand=1 
Check, is this api part of another build profile? Null value for key: 
removedeleteUcsManager preProcessedCommand=1 
Check, is this api part of another build 

database high availability

2015-07-26 Thread Alireza Eskandari
Hi everybody,
Do anyone have any practical experience with multi master (active/active) 
database cluster for CloudStack?
If yes, what is best practices and suggestions?

BTW, what is cloudstack-mysql-ha-xxx.rpm? How can I use it? It seems that there 
is no official document for it.
Regards,
Alireza


Multiple Nexus1000v enabled Clusters in one Zone

2015-09-01 Thread Alireza Eskandari
Hi everybody,
I use CloudStack 4.5.2 with ESXi 5.5 and Nexus 1000v 
- I created "Cluster01" in vCenter. I added this cluster to "Nexus01" with 
"uplink01" port-profile. I connected this cluster to CloudStack without 
problem. 
- I created "Cluster02" in vCenter. I added this cluster to "Nexus01" with 
"uplink01" port-profile. But I couldn't connect this cluster to CloudStack 
because CloudStack doesn't let to use one VSM for multiple cluster. 
- So I created a new VSM named "Nexus02" and added hosts in "Cluster02" with 
"uplink02" port-profile to it. 
- In CloudStack I created a new cluster with "Override Public-Traffic" and 
"Override Guest-Traffic" selected and I entered "uplink02" as "Public/Guest 
Traffic vSwitch Name". I entered new VSM credential and created cluster 
successfully. 
- But when I want to create a new VM in this cluster, I get error. 
- It seems that CloudStack doesn't pay attention to traffic overriding. 
Is it normal behaviour or it is a bug? 





2015-09-01 14:29:44,810 DEBUG [c.c.h.v.r.VmwareResource] 
(DirectAgent-124:ctx-f38a0ab9 172.16.78.7, job-190/job-191, cmd: StartCommand) 
VM i-2-14-VM will be started with NIC device type: Vmxnet3 
2015-09-01 14:29:44,811 INFO  [c.c.h.v.r.VmwareResource] 
(DirectAgent-124:ctx-f38a0ab9 172.16.78.7, job-190/job-191, cmd: StartCommand) 
Prepare NIC device based on NicTO: 
{"deviceId":0,"networkRateMbps":200,"defaultNic":true,"pxeDisable":false,"nicUuid":"da6fac33-2b9c-4d6f-b9bb-fdb2610de7e0","uuid":"ab58bf0f-44b4-4a1c-a1ae-4a3a975c6ba1","ip":"10.1.1.239","netmask":"255.255.255.0","gateway":"10.1.1.1","mac":"02:00:2d:9c:00:01","dns1":"8.8.8.8","dns2":"4.2.2.4","broadcastType":"Vlan","type":"Guest","broadcastUri":"vlan://1205","isolationUri":"vlan://1205","isSecurityGroupEnabled":false,"name":"uplink01,1206,nexusdvs"}
 
2015-09-01 14:29:44,818 INFO  [c.c.h.v.r.VmwareResource] 
(DirectAgent-124:ctx-f38a0ab9 172.16.78.7, job-190/job-191, cmd: StartCommand) 
Prepare network on nexusdvs uplink01 with name prefix: cloud.guest 
2015-09-01 14:29:44,833 INFO  [c.c.h.v.m.HypervisorHostHelper] 
(DirectAgent-124:ctx-f38a0ab9 172.16.78.7, job-190/job-191, cmd: StartCommand) 
Found Ethernet port profile uplink01 
2015-09-01 14:29:44,833 INFO  [c.c.h.v.m.HypervisorHostHelper] 
(DirectAgent-124:ctx-f38a0ab9 172.16.78.7, job-190/job-191, cmd: StartCommand) 
Stocking credentials of Nexus VSM 
2015-09-01 14:29:44,840 INFO  [c.c.h.v.m.HypervisorHostHelper] 
(DirectAgent-124:ctx-f38a0ab9 172.16.78.7, job-190/job-191, cmd: StartCommand) 
Port profile cloud.guest.1205.200.1-uplink01 found. 
2015-09-01 14:29:45,453 WARN  [c.c.h.v.r.VmwareResource] 
(DirectAgent-124:ctx-f38a0ab9 172.16.78.7, job-190/job-191, cmd: StartCommand) 
StartCommand failed due to Exception: 
com.cloud.utils.exception.CloudRuntimeException 
Message:  Severity: error, Error code: InvalidValue, Error type: application, 
Error Message: Syntax error while parsing 'show port-profile name 
cloud.guest.1205.200.1-uplink01 ' 

, Error info: 
show 


com.cloud.utils.exception.CloudRuntimeException:  Severity: error, Error code: 
InvalidValue, Error type: application, Error Message: Syntax error while 
parsing 'show port-profile name cloud.guest.1205.200.1-uplink01 ' 

, Error info: 
show 

at 
com.cloud.utils.cisco.n1kv.vsm.NetconfHelper.getPortProfileByName(NetconfHelper.java:185)
 
at 
com.cloud.hypervisor.vmware.mo.HypervisorHostHelper.updatePortProfile(HypervisorHostHelper.java:324)
 
at 
com.cloud.hypervisor.vmware.mo.HypervisorHostHelper.prepareNetwork(HypervisorHostHelper.java:581)
 
at 
com.cloud.hypervisor.vmware.resource.VmwareResource.prepareNetworkFromNicInfo(VmwareResource.java:2502)
 
at 
com.cloud.hypervisor.vmware.resource.VmwareResource.execute(VmwareResource.java:1685)
 
at 
com.cloud.hypervisor.vmware.resource.VmwareResource.executeRequest(VmwareResource.java:450)
 
at 
com.cloud.agent.manager.DirectAgentAttache$Task.runInContext(DirectAgentAttache.java:302)
 
at 
org.apache.cloudstack.managed.context.ManagedContextRunnable$1.run(ManagedContextRunnable.java:49)
 
at 
org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:56)
 
at 
org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:103)
 
at 
org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:53)
 
at 
org.apache.cloudstack.managed.context.ManagedContextRunnable.run(ManagedContextRunnable.java:46)
 
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) 
at java.util.concurrent.FutureTask.run(FutureTask.java:262) 
at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
 
at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
 
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 
at 

Nexus DVS for multiple clusters in a zone

2015-09-05 Thread Alireza Eskandari
Hello everybody. 
As you may know we can create a Nexus DVS as "VMWare Datacenter" wide. So 
multiple cluster in this datacenter can use this Nexus DVS. 
But in CloudStack we have to use each Nexus DVS for only one cluster and we 
can't share this Nexus DVS among multi clusters. 
Could anyone tell me the reason of this limitation? 
Regards, 
Alireza


use android keyboard on cloudstack console

2015-12-28 Thread Alireza Eskandari
HiDo you know any workaround to force android smartphones to popup keyborad 
when we tap on console of a VM?Regards

Read/Write splitting on database

2015-11-18 Thread Alireza Eskandari
Hi all,
According to link below, does CloudStack split read/write request between 
master and slaves?
https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=34838207

regards,
Alireza 


Re: Read/Write splitting on database

2015-11-20 Thread Alireza Eskandari
Is there anyone to answer my question?
Thanks.


- Original Message -
From: Alireza Eskandari <astro.alir...@yahoo.com.INVALID>
To: Dev <dev@cloudstack.apache.org>
Sent: Wednesday, November 18, 2015 12:30 PM
Subject: Read/Write splitting on database

Hi all,
According to link below, does CloudStack split read/write request between 
master and slaves?
https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=34838207

regards,
Alireza 


best practices in usage server

2016-02-06 Thread Alireza Eskandari
Hi,
I have a 2 node cluster of CS with a separated MariaDB cluster based on Galera 
as database.
What is your recommendation in installing usage server of CS?
Should I install it on a separated server or on CS nodes?
Is it necessary to install in on both CS nodes?
Regards 


Proof of CloudStack compatibility with vSphere 6

2016-08-17 Thread Alireza Eskandari
Hi all,Our team want to test compatibility of CloudStack with vSphere 6.1- 
Which tests should we run in our environment to make sure that vSphere 6 is 
fully compatible with CloudStack?2- From which version of CloudStack we can use 
vSphere 6?Regards,Alireza 

Traffic usage of each instance

2016-11-22 Thread Alireza Eskandari
Hi
AFAIK CS calculates traffic usage per account, not per instance.
Is there any internal or 3rd party solution for getting traffic usage per 
instance from CS?
Regards,
Alireza


RE: [DISCUSS] CloudStack 4.9.3.0 (LTS)

2017-08-05 Thread Alireza Eskandari
Hi Rohit
Please consider these bugs in next release:
https://issues.apache.org/jira/browse/CLOUDSTACK-10033
https://issues.apache.org/jira/browse/CLOUDSTACK-9994


Re: [New Feature] noVNC console in Cloudstack

2017-08-29 Thread Alireza Eskandari
Amazing feature!
Could you please investigate on using smartphone keyboards with the console?
I can view the current console by mobile but I cannot use mouse and
keyboard. Does noVNC have any solution for it?

On Aug 30, 2017 00:27, "sachin patil"  wrote:

@wei...yeah I can share some screen shots. I have already attached one in
my design document.
https://cwiki.apache.org/confluence/display/CLOUDSTACK/
noVNC+support+for+Cloudstack

On Wed, Aug 30, 2017 at 12:09 AM, Jan-Arve Nygård  wrote:

> Well done!
>
> tir. 29. aug. 2017 kl. 13.15 skrev Wei ZHOU :
>
> > nice job!
> >
> > Could you paste some screenshots ?
> >
> > -Wei
> >
> > 2017-08-29 8:39 GMT+02:00 Haijiao <18602198...@163.com>:
> >
> > > Awesome work,  I know lots of community users will love it .
> > >
> > >
> > >
> > >
> > >
> > >
> > > 在2017年08月29 13时57分, "sachin patil"写道:
> > >
> > > Hello,
> > >
> > > I have integrated noVNC to cloudstack as my gsoc project for this
year,
> > > under the guidance of my mentors @Syed Ahmed and @Rohit Yadav.
> > >
> > > The features that have been added are :
> > >
> > > 1. noVNC support added and tested for KVM / Xenservers
> > > 2. SSL/TLS security.
> > > 3. Tested for RFB versions 3.8 and below.
> > >
> > > I have created a design doc that will help you understand the working.
> > > https://cwiki.apache.org/confluence/display/CLOUDSTACK/
> > > noVNC+support+for+Cloudstack
> > >
> > > PR for the same : https://github.com/apache/cloudstack/pull/2204
> > >
> > > Please let us know your views for this feature we have built.
> > >
> > >
> > > regards,
> > > Sachin Patil
> > >
> >
>


Re: MySQL HA

2017-12-16 Thread Alireza Eskandari
I'm using CS 4.9.3.0-shapeblue0

On Sat, Dec 16, 2017 at 12:49 PM, Rafael Weingärtner
<rafaelweingart...@gmail.com> wrote:
> Awesome!
> I found one method that might seem the cause of the problem.
> What is the version of ACS that you are using?
>
> On Sat, Dec 16, 2017 at 4:10 AM, Alireza Eskandari <astro.alir...@gmail.com>
> wrote:
>
>> Hi
>>
>> Gabriel,
>> My configuration is same as your suggestion, but I get the errors.
>>
>> Rafael,
>> You are right. I confirm that CS works normally but I get those warnings.
>> I would make me happy to help you for this fix :)
>>
>>
>> On Tue, Dec 12, 2017 at 3:30 PM, Rafael Weingärtner
>> <rafaelweingart...@gmail.com> wrote:
>> > Alireza,
>> > This is a warning and should not cause you much trouble. I have been
>> trying
>> > to pin point this problem for quite some time now.
>> > If I generate a fix, would you be willing to test it?
>> >
>> > On Tue, Dec 12, 2017 at 8:56 AM, Gabriel Beims Bräscher <
>> > gabrasc...@gmail.com> wrote:
>> >
>> >> Hi Alireza,
>> >>
>> >> I have production environments with Master to Master replication and
>> >> we have no problems. We may need more details of your configuration.
>> >> Have you configured the slave database? Are you sure that you configured
>> >> correctly the ha heuristic?
>> >>
>> >> Considering that you already configured replication and "my.cnf", I will
>> >> focus on the CloudSack db.properties file.
>> >>
>> >> When configuring Master-Master replication, you should have at
>> >> /etc/cloudstack/management/db.properties something like:
>> >> -
>> >> db.cloud.autoReconnectForPools=true
>> >>
>> >> #High Availability And Cluster Properties
>> >> db.ha.enabled=true
>> >>
>> >> db.cloud.queriesBeforeRetryMaster=5000
>> >> db.usage.failOverReadOnly=false
>> >> db.cloud.slaves=acs-db-02
>> >>
>> >> cluster.node.IP=
>> >>
>> >> db.usage.autoReconnect=true
>> >>
>> >> db.cloud.host=acs-db-01
>> >> db.usage.host=acs-db-01
>> >>
>> >> #db.ha.loadBalanceStrategy=com.mysql.jdbc.SequentialBalanceStrategy
>> >> db.ha.loadBalanceStrategy=com.cloud.utils.db.StaticStrategy
>> >>
>> >> db.cloud.failOverReadOnly=false
>> >> db.usage.slaves=acs-db-02
>> >> -
>> >>
>> >> "db.ha.loadBalanceStrategy" is confiugured with the heuristic
>> >> "com.cloud.utils.db.StaticStrategy"
>> >>
>> >> "db.ha.enabled" need to be “true”
>> >>
>> >> The primary database is configured with the variable “db.cloud.host”.
>> The
>> >> secondary database(s) is(are) configured with the variable
>> >> “db.usage.slaves”. One variable that is different from both Apache
>> >> CloudStack servers is “cluster.node.IP”, being the ACS mgt IP.
>> >> Additionally, you will need to create a folder
>> >> “/usr/share/cloudstack-mysql-ha/lib/” and move the jar file
>> >> “cloud-plugin-database-mysqlha-4.9.3.0.jar” into the new folder.
>> >>
>> >> -
>> >> mkdir -p /usr/share/cloudstack-mysql-ha/lib/
>> >> cp
>> >> /usr/share/cloudstack-management/webapps/client/WEB-
>> >> INF/lib/cloud-plugin-database-mysqlha-4.9.3.0.jar
>> >> /usr/share/cloudstack-mysql-ha/lib/
>> >> -
>> >>
>> >> Cheers,
>> >> Gabriel.
>> >>
>> >> 2017-12-12 6:30 GMT-02:00 Alireza Eskandari <astro.alir...@gmail.com>:
>> >>
>> >> > I have opened a new jira ticket about this problem:
>> >> > https://issues.apache.org/jira/browse/CLOUDSTACK-10186
>> >> >
>> >>
>> >
>> >
>> >
>> > --
>> > Rafael Weingärtner
>>
>
>
>
> --
> Rafael Weingärtner


Re: MySQL HA

2017-12-15 Thread Alireza Eskandari
Hi

Gabriel,
My configuration is same as your suggestion, but I get the errors.

Rafael,
You are right. I confirm that CS works normally but I get those warnings.
I would make me happy to help you for this fix :)


On Tue, Dec 12, 2017 at 3:30 PM, Rafael Weingärtner
<rafaelweingart...@gmail.com> wrote:
> Alireza,
> This is a warning and should not cause you much trouble. I have been trying
> to pin point this problem for quite some time now.
> If I generate a fix, would you be willing to test it?
>
> On Tue, Dec 12, 2017 at 8:56 AM, Gabriel Beims Bräscher <
> gabrasc...@gmail.com> wrote:
>
>> Hi Alireza,
>>
>> I have production environments with Master to Master replication and
>> we have no problems. We may need more details of your configuration.
>> Have you configured the slave database? Are you sure that you configured
>> correctly the ha heuristic?
>>
>> Considering that you already configured replication and "my.cnf", I will
>> focus on the CloudSack db.properties file.
>>
>> When configuring Master-Master replication, you should have at
>> /etc/cloudstack/management/db.properties something like:
>> -
>> db.cloud.autoReconnectForPools=true
>>
>> #High Availability And Cluster Properties
>> db.ha.enabled=true
>>
>> db.cloud.queriesBeforeRetryMaster=5000
>> db.usage.failOverReadOnly=false
>> db.cloud.slaves=acs-db-02
>>
>> cluster.node.IP=
>>
>> db.usage.autoReconnect=true
>>
>> db.cloud.host=acs-db-01
>> db.usage.host=acs-db-01
>>
>> #db.ha.loadBalanceStrategy=com.mysql.jdbc.SequentialBalanceStrategy
>> db.ha.loadBalanceStrategy=com.cloud.utils.db.StaticStrategy
>>
>> db.cloud.failOverReadOnly=false
>> db.usage.slaves=acs-db-02
>> -
>>
>> "db.ha.loadBalanceStrategy" is confiugured with the heuristic
>> "com.cloud.utils.db.StaticStrategy"
>>
>> "db.ha.enabled" need to be “true”
>>
>> The primary database is configured with the variable “db.cloud.host”. The
>> secondary database(s) is(are) configured with the variable
>> “db.usage.slaves”. One variable that is different from both Apache
>> CloudStack servers is “cluster.node.IP”, being the ACS mgt IP.
>> Additionally, you will need to create a folder
>> “/usr/share/cloudstack-mysql-ha/lib/” and move the jar file
>> “cloud-plugin-database-mysqlha-4.9.3.0.jar” into the new folder.
>>
>> -
>> mkdir -p /usr/share/cloudstack-mysql-ha/lib/
>> cp
>> /usr/share/cloudstack-management/webapps/client/WEB-
>> INF/lib/cloud-plugin-database-mysqlha-4.9.3.0.jar
>> /usr/share/cloudstack-mysql-ha/lib/
>> -
>>
>> Cheers,
>> Gabriel.
>>
>> 2017-12-12 6:30 GMT-02:00 Alireza Eskandari <astro.alir...@gmail.com>:
>>
>> > I have opened a new jira ticket about this problem:
>> > https://issues.apache.org/jira/browse/CLOUDSTACK-10186
>> >
>>
>
>
>
> --
> Rafael Weingärtner


Re: MySQL HA

2017-12-18 Thread Alireza Eskandari
)
at 
org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96)
at 
org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96)
at 
com.cloud.utils.db.ConnectionConcierge$ConnectionConciergeManager.testValidity(ConnectionConcierge.java:148)
at 
com.cloud.utils.db.ConnectionConcierge$ConnectionConciergeManager$1.runInContext(ConnectionConcierge.java:203)
at 
org.apache.cloudstack.managed.context.ManagedContextRunnable$1.run(ManagedContextRunnable.java:49)
at 
org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:56)
at 
org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:103)
at 
org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:53)
at 
org.apache.cloudstack.managed.context.ManagedContextRunnable.run(ManagedContextRunnable.java:46)
at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:473)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:622)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.net.SocketException: Broken pipe (Write failed)
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:115)
at java.net.SocketOutputStream.write(SocketOutputStream.java:161)
... 36 more

On Mon, Dec 18, 2017 at 2:03 PM, Rafael Weingärtner
<rafaelweingart...@gmail.com> wrote:
> Here is a fix:
> https://www.dropbox.com/s/kgakhs3v05uz88x/cloud-framework-cluster-4.9.3.0.jar?dl=1
> You need to replace this jar file in CloudStack installation. You should
> also backup the original jar and restore it as soon as you finish testing.
> To replace the JARs, you need to stop ACS, and just then start it.
>
> If everything works fine, I will open a PR against master, and with a bit
> of luck we can push it into 4.11
>
> On Sat, Dec 16, 2017 at 8:03 AM, Alireza Eskandari <astro.alir...@gmail.com>
> wrote:
>
>> I'm using CS 4.9.3.0-shapeblue0
>>
>> On Sat, Dec 16, 2017 at 12:49 PM, Rafael Weingärtner
>> <rafaelweingart...@gmail.com> wrote:
>> > Awesome!
>> > I found one method that might seem the cause of the problem.
>> > What is the version of ACS that you are using?
>> >
>> > On Sat, Dec 16, 2017 at 4:10 AM, Alireza Eskandari <
>> astro.alir...@gmail.com>
>> > wrote:
>> >
>> >> Hi
>> >>
>> >> Gabriel,
>> >> My configuration is same as your suggestion, but I get the errors.
>> >>
>> >> Rafael,
>> >> You are right. I confirm that CS works normally but I get those
>> warnings.
>> >> I would make me happy to help you for this fix :)
>> >>
>> >>
>> >> On Tue, Dec 12, 2017 at 3:30 PM, Rafael Weingärtner
>> >> <rafaelweingart...@gmail.com> wrote:
>> >> > Alireza,
>> >> > This is a warning and should not cause you much trouble. I have been
>> >> trying
>> >> > to pin point this problem for quite some time now.
>> >> > If I generate a fix, would you be willing to test it?
>> >> >
>> >> > On Tue, Dec 12, 2017 at 8:56 AM, Gabriel Beims Bräscher <
>> >> > gabrasc...@gmail.com> wrote:
>> >> >
>> >> >> Hi Alireza,
>> >> >>
>> >> >> I have production environments with Master to Master replication and
>> >> >> we have no problems. We may need more details of your configuration.
>> >> >> Have you configured the slave database? Are you sure that you
>> configured
>> >> >> correctly the ha heuristic?
>> >> >>
>> >> >> Considering that you already configured replication and "my.cnf", I
>> will
>> >> >> focus on the CloudSack db.properties file.
>> >> >>
>> >> >> When configuring Master-Master replication, you should have at
>> >> >> /etc/cloudstack/management/db.propert

Re: MySQL HA

2017-12-18 Thread Alireza Eskandari
Yes, I'll keep it and do some stress tests on it to be sure about its
functionality.

On Dec 18, 2017 14:53, "Rafael Weingärtner" <rafaelweingart...@gmail.com>
wrote:

> So, this fixed the problem?
> Can you keep this running for a while longer? Just to make sure. Then, I
> can open a PR to fix it in master.
>
> On Mon, Dec 18, 2017 at 9:02 AM, Alireza Eskandari <
> astro.alir...@gmail.com>
> wrote:
>
> > Thank you Rafael,
> > I test your fix and it seems that I have got the expected result. You
> > can see the exception raised for database failover.
> > I should notice I replace the file for cloudstack-mnagement and
> > cloudstack-usage:
> > /usr/share/cloudstack-usage/lib/cloud-framework-cluster-4.9.3.0.jar
> > /usr/share/cloudstack-management/webapps/client/WEB-
> > INF/lib/cloud-framework-cluster-4.9.3.0.jar
> >
> >
> > Logs:
> >
> > WARN  [c.c.c.d.ManagementServerHostDaoImpl]
> > (Cluster-Heartbeat-1:ctx-073cca55) (logid:e652d00b) Unexpected
> > exception,
> > com.cloud.utils.exception.CloudRuntimeException: Unable to commit or
> > close the connection.
> > at com.cloud.utils.db.TransactionLegacy.commit(
> > TransactionLegacy.java:740)
> > at com.cloud.cluster.dao.ManagementServerHostDaoImpl.update(
> > ManagementServerHostDaoImpl.java:140)
> > at sun.reflect.GeneratedMethodAccessor103.invoke(Unknown Source)
> > at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> > DelegatingMethodAccessorImpl.java:43)
> > at java.lang.reflect.Method.invoke(Method.java:606)
> > at org.springframework.aop.support.AopUtils.
> > invokeJoinpointUsingReflection(AopUtils.java:317)
> > at org.springframework.aop.framework.ReflectiveMethodInvocation.
> > invokeJoinpoint(ReflectiveMethodInvocation.java:183)
> > at org.springframework.aop.framework.ReflectiveMethodInvocation.
> > proceed(ReflectiveMethodInvocation.java:150)
> > at com.cloud.utils.db.TransactionContextInterceptor.invoke(
> > TransactionContextInterceptor.java:34)
> > at org.springframework.aop.framework.ReflectiveMethodInvocation.
> > proceed(ReflectiveMethodInvocation.java:161)
> > at org.springframework.aop.interceptor.
> > ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:91)
> > at org.springframework.aop.framework.ReflectiveMethodInvocation.
> > proceed(ReflectiveMethodInvocation.java:172)
> > at org.springframework.aop.framework.JdkDynamicAopProxy.
> > invoke(JdkDynamicAopProxy.java:204)
> > at com.sun.proxy.$Proxy203.update(Unknown Source)
> > at com.cloud.cluster.ClusterManagerImpl$4.runInContext(
> > ClusterManagerImpl.java:555)
> > at org.apache.cloudstack.managed.context.
> > ManagedContextRunnable$1.run(ManagedContextRunnable.java:49)
> > at org.apache.cloudstack.managed.context.impl.
> > DefaultManagedContext$1.call(DefaultManagedContext.java:56)
> > at org.apache.cloudstack.managed.context.impl.
> > DefaultManagedContext.callWithContext(DefaultManagedContext.java:103)
> > at org.apache.cloudstack.managed.context.impl.
> > DefaultManagedContext.runWithContext(DefaultManagedContext.java:53)
> > at org.apache.cloudstack.managed.context.
> > ManagedContextRunnable.run(ManagedContextRunnable.java:46)
> > at java.util.concurrent.Executors$RunnableAdapter.
> > call(Executors.java:473)
> > at java.util.concurrent.FutureTask.runAndReset(
> > FutureTask.java:304)
> > at java.util.concurrent.ScheduledThreadPoolExecutor$
> > ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
> > at java.util.concurrent.ScheduledThreadPoolExecutor$
> > ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
> > at java.util.concurrent.ThreadPoolExecutor.runWorker(
> > ThreadPoolExecutor.java:1152)
> > at java.util.concurrent.ThreadPoolExecutor$Worker.run(
> > ThreadPoolExecutor.java:622)
> > at java.lang.Thread.run(Thread.java:748)
> > Caused by: com.mysql.jdbc.exceptions.jdbc4.
> MySQLTransactionRollbackExcept
> > ion:
> > Deadlock found when trying to get lock; try restarting transaction
> > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> > Method)
> > at sun.reflect.NativeConstructorAccessorImpl.newInstance(
> > NativeConstructorAccessorImpl.java:57)
> > at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(
> > DelegatingConstructorAccessorImpl.java:45

No database selected for the transaction

2017-11-21 Thread Alireza Eskandari
Hi all,
I'm using a cluster of CS 4.9.3 with 2 nodes.
After couple of weeks, I get "No database selected for the
transaction" error in logs and I have to restart the CS services to
resolve the issue.
Could you help me about it?

Here is the logs:

2017-11-21 10:37:35,641 WARN  [c.c.c.d.ManagementServerHostDaoImpl]
(Cluster-Heartbeat-1:ctx-a32c78be) (logid:c9227f75) Unexpected
exception,
com.cloud.utils.exception.CloudRuntimeException: No database selected
for the transaction
at 
com.cloud.utils.db.TransactionLegacy.getConnection(TransactionLegacy.java:580)
at 
com.cloud.utils.db.TransactionLegacy.prepareStatement(TransactionLegacy.java:467)
at 
com.cloud.utils.db.TransactionLegacy.prepareAutoCloseStatement(TransactionLegacy.java:460)
at 
com.cloud.cluster.dao.ManagementServerHostDaoImpl.update(ManagementServerHostDaoImpl.java:134)
at sun.reflect.GeneratedMethodAccessor76.invoke(Unknown Source)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at 
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
at 
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at 
com.cloud.utils.db.TransactionContextInterceptor.invoke(TransactionContextInterceptor.java:34)
at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
at 
org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:91)
at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at 
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at com.sun.proxy.$Proxy201.update(Unknown Source)
at 
com.cloud.cluster.ClusterManagerImpl$4.runInContext(ClusterManagerImpl.java:554)
at 
org.apache.cloudstack.managed.context.ManagedContextRunnable$1.run(ManagedContextRunnable.java:49)
at 
org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:56)
at 
org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:103)
at 
org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:53)
at 
org.apache.cloudstack.managed.context.ManagedContextRunnable.run(ManagedContextRunnable.java:46)
at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:473)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:622)
at java.lang.Thread.run(Thread.java:748)
2017-11-21 10:37:35,641 ERROR [c.c.c.ClusterManagerImpl]
(Cluster-Heartbeat-1:ctx-a32c78be) (logid:c9227f75) Unexpected
exception in cluster heartbeat
java.lang.RuntimeException: No database selected for the transaction
at 
com.cloud.cluster.dao.ManagementServerHostDaoImpl.update(ManagementServerHostDaoImpl.java:148)
at sun.reflect.GeneratedMethodAccessor76.invoke(Unknown Source)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at 
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
at 
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at 
com.cloud.utils.db.TransactionContextInterceptor.invoke(TransactionContextInterceptor.java:34)
at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
at 
org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:91)
at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at 
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at com.sun.proxy.$Proxy201.update(Unknown Source)
at 

Re: No database selected for the transaction

2017-11-21 Thread Alireza Eskandari
I should say that I'm using a cluster of MariaDB on Galera with 3
nodes. All of them are master but I'm using one node at a time by
assign a virtual IP to it.
Here is db.properties on node1:

# management server clustering parameters, change cluster.node.IP to
the machine IP address
# in which the management server(Tomcat) is running
cluster.node.IP=172.17.60.31
cluster.servlet.port=9090
region.id=1

# CloudStack database settings
db.cloud.username=cloud
db.cloud.password=ENC()
db.cloud.host=csdb-cltr01.cloud.local
db.cloud.driver=jdbc:mysql
db.cloud.port=3306
db.cloud.name=cloud

# CloudStack database tuning parameters
db.cloud.maxActive=250
db.cloud.maxIdle=30
db.cloud.maxWait=1
db.cloud.validationQuery=SELECT 1
db.cloud.testOnBorrow=true
db.cloud.testWhileIdle=true
db.cloud.timeBetweenEvictionRunsMillis=4
db.cloud.minEvictableIdleTimeMillis=24
db.cloud.poolPreparedStatements=false
db.cloud.url.params=prepStmtCacheSize=517=true=sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'

# CloudStack database SSL settings
db.cloud.useSSL=true
db.cloud.keyStore=/etc/ssl/certs/mariadb/clst01.keystore
db.cloud.keyStorePassword=
db.cloud.trustStore=/etc/ssl/certs/mariadb/clst.truststore
db.cloud.trustStorePassword=
db.cloud.keyStorePassphrase=vmops.com

# Encryption Settings
db.cloud.encryption.type=file
db.cloud.encrypt.secret=ENC()

# usage database settings
db.usage.username=cloud
db.usage.password=ENC()
db.usage.host=csdb-cltr01.cloud.local
db.usage.driver=jdbc:mysql
db.usage.port=3306
db.usage.name=cloud_usage

# usage database tuning parameters
db.usage.maxActive=100
db.usage.maxIdle=30
db.usage.maxWait=1
db.usage.url.params=

# Simulator database settings
db.simulator.username=cloud
db.simulator.password=cloud
db.simulator.host=localhost
db.simulator.driver=jdbc:mysql
db.simulator.port=3306
db.simulator.name=simulator
db.simulator.maxActive=250
db.simulator.maxIdle=30
db.simulator.maxWait=1
db.simulator.autoReconnect=true


# High Availability And Cluster Properties
db.ha.enabled=false
db.ha.loadBalanceStrategy=com.cloud.utils.db.StaticStrategy
# cloud stack Database
db.cloud.slaves=localhost,localhost
db.cloud.autoReconnect=true
db.cloud.failOverReadOnly=false
db.cloud.reconnectAtTxEnd=true
db.cloud.autoReconnectForPools=true
db.cloud.secondsBeforeRetryMaster=3600
db.cloud.queriesBeforeRetryMaster=5000
db.cloud.initialTimeout=3600

#usage Database
db.usage.slaves=localhost,localhost
db.usage.autoReconnect=true
db.usage.failOverReadOnly=false
db.usage.reconnectAtTxEnd=true
db.usage.autoReconnectForPools=true
db.usage.secondsBeforeRetryMaster=3600
db.usage.queriesBeforeRetryMaster=5000
db.usage.initialTimeout=3600

On Tue, Nov 21, 2017 at 12:46 PM, Rohit Yadav <rohit.ya...@shapeblue.com> wrote:
> Alireza,
>
>
> Can you share your db.properties file (you may replace password/ips with 
> dummy ones)?
>
>
> - Rohit
>
> 
> From: Ivan Kudryavtsev <kudryavtsev...@bw-sw.com>
> Sent: Tuesday, November 21, 2017 2:32:50 PM
> To: dev@cloudstack.apache.org
> Subject: Re: No database selected for the transaction
>
> Also, have seen that with 4.10 with two management servers on one of them.
>
> 21 нояб. 2017 г. 3:36 ПП пользователь "Alireza Eskandari" <
> astro.alir...@gmail.com> написал:
>
>> Hi all,
>> I'm using a cluster of CS 4.9.3 with 2 nodes.
>> After couple of weeks, I get "No database selected for the
>> transaction" error in logs and I have to restart the CS services to
>> resolve the issue.
>> Could you help me about it?
>>
>> Here is the logs:
>>
>> 2017-11-21 10:37:35,641 WARN  [c.c.c.d.ManagementServerHostDaoImpl]
>> (Cluster-Heartbeat-1:ctx-a32c78be) (logid:c9227f75) Unexpected
>> exception,
>> com.cloud.utils.exception.CloudRuntimeException: No database selected
>> for the transaction
>> at com.cloud.utils.db.TransactionLegacy.getConnection(
>> TransactionLegacy.java:580)
>> at com.cloud.utils.db.TransactionLegacy.prepareStatement(
>> TransactionLegacy.java:467)
>> at com.cloud.utils.db.TransactionLegacy.prepareAutoCloseStatement(
>> TransactionLegacy.java:460)
>> at com.cloud.cluster.dao.ManagementServerHostDaoImpl.update(
>> ManagementServerHostDaoImpl.java:134)
>> at sun.reflect.GeneratedMethodAccessor76.invoke(Unknown Source)
>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(
>> DelegatingMethodAccessorImpl.java:43)
>> at java.lang.reflect.Method.invoke(Method.java:606)
>> at org.springframework.aop.support.AopUtils.
>> invokeJoinpointUsingReflection(AopUtils.java:317)
>> at org.springframework.aop.framework.Refle

MySQL HA

2017-12-11 Thread Alireza Eskandari
Hi
I want to use MySQL HA for CloudStack.
I have installed cloudstack-mysql-ha package and configure
db.properties with appropriate options, but when I stop the first
mysql node, I this error frequently:

2017-12-11 15:13:17,146 WARN  [c.c.c.d.ManagementServerHostDaoImpl]
(Cluster-Heartbeat-1:ctx-aa0c96da) (logid:ee470520) Unexpected
exception,
com.cloud.utils.exception.CloudRuntimeException: No database selected
for the transaction
at 
com.cloud.utils.db.TransactionLegacy.getConnection(TransactionLegacy.java:580)
at 
com.cloud.utils.db.TransactionLegacy.prepareStatement(TransactionLegacy.java:467)
at 
com.cloud.utils.db.TransactionLegacy.prepareAutoCloseStatement(TransactionLegacy.java:460)
at 
com.cloud.cluster.dao.ManagementServerHostDaoImpl.update(ManagementServerHostDaoImpl.java:134)
at sun.reflect.GeneratedMethodAccessor81.invoke(Unknown Source)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at 
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
at 
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at 
com.cloud.utils.db.TransactionContextInterceptor.invoke(TransactionContextInterceptor.java:34)
at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
at 
org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:91)
at 
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at 
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at com.sun.proxy.$Proxy203.update(Unknown Source)
at 
com.cloud.cluster.ClusterManagerImpl$4.runInContext(ClusterManagerImpl.java:554)
at 
org.apache.cloudstack.managed.context.ManagedContextRunnable$1.run(ManagedContextRunnable.java:49)
at 
org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:56)
at 
org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:103)
at 
org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:53)
at 
org.apache.cloudstack.managed.context.ManagedContextRunnable.run(ManagedContextRunnable.java:46)
at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:473)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:622)
at java.lang.Thread.run(Thread.java:748)


Re: MySQL HA

2017-12-12 Thread Alireza Eskandari
I have opened a new jira ticket about this problem:
https://issues.apache.org/jira/browse/CLOUDSTACK-10186


Re: MySQL HA

2018-07-05 Thread Alireza Eskandari
Ok, I'm going to deploy a lab for cs 4.11 in next few days and test the
scenario on it.
Thanks

On Thu, Jul 5, 2018, 12:12 Rohit Yadav  wrote:

> Alireza,
>
>
> Can you test against 4.11.1.0? Likely, Rafael suggestion may be around the
> recent release than older 4.9/4.10 releases.
>
>
> - Rohit
>
> <https://cloudstack.apache.org>
>
>
>
> ____
> From: Alireza Eskandari 
> Sent: Wednesday, July 4, 2018 8:13:16 PM
> To: dev@cloudstack.apache.org
> Cc: rafaelweingart...@gmail.com
> Subject: Re: MySQL HA
>
> Hi
> Your fix works as expected, thanks.
> But today I update CS to 4.9.3.1 and it seems that the fix was not ported
> to this version.
> Could you please send me an updated version of that jar file?
> Regards
>
> On Mon, Dec 18, 2017, 14:03 Rafael Weingärtner <
> rafaelweingart...@gmail.com>
> wrote:
>
> > Here is a fix:
> >
> >
> https://www.dropbox.com/s/kgakhs3v05uz88x/cloud-framework-cluster-4.9.3.0.jar?dl=1
> > You need to replace this jar file in CloudStack installation. You should
> > also backup the original jar and restore it as soon as you finish
> testing.
> > To replace the JARs, you need to stop ACS, and just then start it.
> >
> > If everything works fine, I will open a PR against master, and with a bit
> > of luck we can push it into 4.11
> >
> > On Sat, Dec 16, 2017 at 8:03 AM, Alireza Eskandari <
> > astro.alir...@gmail.com>
> > wrote:
> >
> > > I'm using CS 4.9.3.0-shapeblue0
> > >
> > > On Sat, Dec 16, 2017 at 12:49 PM, Rafael Weingärtner
> > >  wrote:
> > > > Awesome!
> > > > I found one method that might seem the cause of the problem.
> > > > What is the version of ACS that you are using?
> > > >
> > > > On Sat, Dec 16, 2017 at 4:10 AM, Alireza Eskandari <
> > > astro.alir...@gmail.com>
> > > > wrote:
> > > >
> > > >> Hi
> > > >>
> > > >> Gabriel,
> > > >> My configuration is same as your suggestion, but I get the errors.
> > > >>
> > > >> Rafael,
> > > >> You are right. I confirm that CS works normally but I get those
> > > warnings.
> > > >> I would make me happy to help you for this fix :)
> > > >>
> > > >>
> > > >> On Tue, Dec 12, 2017 at 3:30 PM, Rafael Weingärtner
> > > >>  wrote:
> > > >> > Alireza,
> > > >> > This is a warning and should not cause you much trouble. I have
> been
> > > >> trying
> > > >> > to pin point this problem for quite some time now.
> > > >> > If I generate a fix, would you be willing to test it?
> > > >> >
> > > >> > On Tue, Dec 12, 2017 at 8:56 AM, Gabriel Beims Bräscher <
> > > >> > gabrasc...@gmail.com> wrote:
> > > >> >
> > > >> >> Hi Alireza,
> > > >> >>
> > > >> >> I have production environments with Master to Master replication
> > and
> > > >> >> we have no problems. We may need more details of your
> > configuration.
> > > >> >> Have you configured the slave database? Are you sure that you
> > > configured
> > > >> >> correctly the ha heuristic?
> > > >> >>
> > > >> >> Considering that you already configured replication and
> "my.cnf", I
> > > will
> > > >> >> focus on the CloudSack db.properties file.
> > > >> >>
> > > >> >> When configuring Master-Master replication, you should have at
> > > >> >> /etc/cloudstack/management/db.properties something like:
> > > >> >> -
> > > >> >> db.cloud.autoReconnectForPools=true
> > > >> >>
> > > >> >> #High Availability And Cluster Properties
> > > >> >> db.ha.enabled=true
> > > >> >>
> > > >> >> db.cloud.queriesBeforeRetryMaster=5000
> > > >> >> db.usage.failOverReadOnly=false
> > > >> >> db.cloud.slaves=acs-db-02
> > > >> >>
> > > >> >> cluster.node.IP=
> > > >> >>
> > > >> >> db.usage.autoReconnect=true
> > > >> >>
> > > >> >> db.cloud.host=acs-db-01
> > >

Re: MySQL HA

2018-07-04 Thread Alireza Eskandari
Hi
Your fix works as expected, thanks.
But today I update CS to 4.9.3.1 and it seems that the fix was not ported
to this version.
Could you please send me an updated version of that jar file?
Regards

On Mon, Dec 18, 2017, 14:03 Rafael Weingärtner 
wrote:

> Here is a fix:
>
> https://www.dropbox.com/s/kgakhs3v05uz88x/cloud-framework-cluster-4.9.3.0.jar?dl=1
> You need to replace this jar file in CloudStack installation. You should
> also backup the original jar and restore it as soon as you finish testing.
> To replace the JARs, you need to stop ACS, and just then start it.
>
> If everything works fine, I will open a PR against master, and with a bit
> of luck we can push it into 4.11
>
> On Sat, Dec 16, 2017 at 8:03 AM, Alireza Eskandari <
> astro.alir...@gmail.com>
> wrote:
>
> > I'm using CS 4.9.3.0-shapeblue0
> >
> > On Sat, Dec 16, 2017 at 12:49 PM, Rafael Weingärtner
> >  wrote:
> > > Awesome!
> > > I found one method that might seem the cause of the problem.
> > > What is the version of ACS that you are using?
> > >
> > > On Sat, Dec 16, 2017 at 4:10 AM, Alireza Eskandari <
> > astro.alir...@gmail.com>
> > > wrote:
> > >
> > >> Hi
> > >>
> > >> Gabriel,
> > >> My configuration is same as your suggestion, but I get the errors.
> > >>
> > >> Rafael,
> > >> You are right. I confirm that CS works normally but I get those
> > warnings.
> > >> I would make me happy to help you for this fix :)
> > >>
> > >>
> > >> On Tue, Dec 12, 2017 at 3:30 PM, Rafael Weingärtner
> > >>  wrote:
> > >> > Alireza,
> > >> > This is a warning and should not cause you much trouble. I have been
> > >> trying
> > >> > to pin point this problem for quite some time now.
> > >> > If I generate a fix, would you be willing to test it?
> > >> >
> > >> > On Tue, Dec 12, 2017 at 8:56 AM, Gabriel Beims Bräscher <
> > >> > gabrasc...@gmail.com> wrote:
> > >> >
> > >> >> Hi Alireza,
> > >> >>
> > >> >> I have production environments with Master to Master replication
> and
> > >> >> we have no problems. We may need more details of your
> configuration.
> > >> >> Have you configured the slave database? Are you sure that you
> > configured
> > >> >> correctly the ha heuristic?
> > >> >>
> > >> >> Considering that you already configured replication and "my.cnf", I
> > will
> > >> >> focus on the CloudSack db.properties file.
> > >> >>
> > >> >> When configuring Master-Master replication, you should have at
> > >> >> /etc/cloudstack/management/db.properties something like:
> > >> >> -
> > >> >> db.cloud.autoReconnectForPools=true
> > >> >>
> > >> >> #High Availability And Cluster Properties
> > >> >> db.ha.enabled=true
> > >> >>
> > >> >> db.cloud.queriesBeforeRetryMaster=5000
> > >> >> db.usage.failOverReadOnly=false
> > >> >> db.cloud.slaves=acs-db-02
> > >> >>
> > >> >> cluster.node.IP=
> > >> >>
> > >> >> db.usage.autoReconnect=true
> > >> >>
> > >> >> db.cloud.host=acs-db-01
> > >> >> db.usage.host=acs-db-01
> > >> >>
> > >> >> #db.ha.loadBalanceStrategy=com.mysql.jdbc.SequentialBalanceStrategy
> > >> >> db.ha.loadBalanceStrategy=com.cloud.utils.db.StaticStrategy
> > >> >>
> > >> >> db.cloud.failOverReadOnly=false
> > >> >> db.usage.slaves=acs-db-02
> > >> >> -
> > >> >>
> > >> >> "db.ha.loadBalanceStrategy" is confiugured with the heuristic
> > >> >> "com.cloud.utils.db.StaticStrategy"
> > >> >>
> > >> >> "db.ha.enabled" need to be “true”
> > >> >>
> > >> >> The primary database is configured with the variable
> “db.cloud.host”.
> > >> The
> > >> >> secondary database(s) is(are) configured with the variable
> > >> >> “db.usage.slaves”. One variable that is different from both Apache
> > >> >> CloudStack servers is “cluster.node.IP”, being the ACS mgt IP.
> > >> >> Additionally, you will need to create a folder
> > >> >> “/usr/share/cloudstack-mysql-ha/lib/” and move the jar file
> > >> >> “cloud-plugin-database-mysqlha-4.9.3.0.jar” into the new folder.
> > >> >>
> > >> >> -
> > >> >> mkdir -p /usr/share/cloudstack-mysql-ha/lib/
> > >> >> cp
> > >> >> /usr/share/cloudstack-management/webapps/client/WEB-
> > >> >> INF/lib/cloud-plugin-database-mysqlha-4.9.3.0.jar
> > >> >> /usr/share/cloudstack-mysql-ha/lib/
> > >> >> -
> > >> >>
> > >> >> Cheers,
> > >> >> Gabriel.
> > >> >>
> > >> >> 2017-12-12 6:30 GMT-02:00 Alireza Eskandari <
> astro.alir...@gmail.com
> > >:
> > >> >>
> > >> >> > I have opened a new jira ticket about this problem:
> > >> >> > https://issues.apache.org/jira/browse/CLOUDSTACK-10186
> > >> >> >
> > >> >>
> > >> >
> > >> >
> > >> >
> > >> > --
> > >> > Rafael Weingärtner
> > >>
> > >
> > >
> > >
> > > --
> > > Rafael Weingärtner
> >
>
>
>
> --
> Rafael Weingärtner
>


Re: Help! Jobs stuck in pending state

2019-01-22 Thread Alireza Eskandari
Here is my query on those tables:

MySQL [cloud]> select * from vm_work_job;
+---+--+--++
| id| step | vm_type  | vm_instance_id |
+---+--+--++
| 57262 | Prepare  | Instance |691 |
| 57268 | Starting | Instance |748 |
+---+--+--++
2 rows in set (0.00 sec)


MySQL [cloud]> SELECT * FROM cloud.sync_queue;
+---+++---+-+-++--+
| id| sync_objtype   | sync_objid | queue_proc_number | created
 | last_updated| queue_size | queue_size_limit |
+---+++---+-+-++--+
| 4 | VmWorkJobQueue |  1 | 3 | 2017-08-28
12:24:09 | 2017-08-28 12:24:42 |  0 |1 |
| 7 | VmWorkJobQueue |  2 | 4 | 2017-08-28
12:24:10 | 2017-08-28 13:18:54 |  0 |1 |
|19 | VmWorkJobQueue |  3 | 4 | 2017-08-28
12:44:09 | 2017-08-29 11:31:09 |  0 |1 |
|34 | VmWorkJobQueue |  4 | 2 | 2017-08-29
11:03:28 | 2017-08-29 11:24:59 |  0 |1 |
.
.
.
| 16360 | VmWorkJobQueue |745 | 2 | 2019-01-22
07:06:48 | 2019-01-22 08:06:56 |  0 |1 |
| 16369 | VmWorkJobQueue |746 | 2 | 2019-01-22
11:01:45 | 2019-01-22 12:03:54 |  0 |1 |
| 16378 | VmWorkJobQueue |747 | 2 | 2019-01-22
13:30:48 | 2019-01-22 14:32:54 |  0 |1 |
| 16390 | VmWorkJobQueue |748 | 1 | 2019-01-22
15:48:53 | 2019-01-22 16:12:53 |  0 |1 |
+---+++---+-+-++--+
740 rows in set (0.01 sec)




On Wed, Jan 23, 2019 at 1:50 AM Wei ZHOU  wrote:

> If you know the instance id and mysql password, it should work after
> removing some records in mysql.
>
> ```
> set @id=X;
>
> delete from vm_work_job where vm_instance_id=@id;
> delete from sync_queue where sync_objid=@id;
> ```
>
> Alireza Eskandari  于2019年1月22日周二 下午10:59写道:
>
> > Hi guys
> > I have opened a bug in jira about my problem in CS:
> > https://issues.apache.org/jira/browse/CLOUDSTACK-10401
> > CloudStack doesn't process jobs! My cloud in totally unusable.
> > Thanks in advance for you help.
> >
>


Help! Jobs stuck in pending state

2019-01-22 Thread Alireza Eskandari
Hi guys
I have opened a bug in jira about my problem in CS:
https://issues.apache.org/jira/browse/CLOUDSTACK-10401
CloudStack doesn't process jobs! My cloud in totally unusable.
Thanks in advance for you help.


Re: Help! Jobs stuck in pending state

2019-01-23 Thread Alireza Eskandari
Dear Suresh and Andrei
Thanks for your help.
I have upgrade CloudStack from 4.9.3 to 4.11.2 but the problem still
persists.
Then I inspect database tables and I found that these three tables could be
the root cause:
- op_ha_work
- op_lock
- vm_work_job
So I delete all records in those tables and problem solved.
The content of those tables are submitted as a comment in the bug report in
jira:
https://issues.apache.org/jira/browse/CLOUDSTACK-10401
Suresh, could you tell me more about the role of those tables in CS?
I think CS had been more sensitive about concurrent jobs. Previous versions
works better.
Regards

On Wed, Jan 23, 2019 at 9:43 PM Suresh Kumar Anaparti <
sureshkumar.anapa...@gmail.com> wrote:

> Hi Alireza,
>
> *sync_queue *table is the actual VM sync queue which holds a queue id for
> each VM (*sync_objtype*: VmWorkJobQueue, *sync_objid*: ) and the VM
> jobs would reside in *sync_queue_item* table against that queue id. Only
> one running job is allowed per VM queue (*queue_size_limit*: 1 in
> *sync_queue* table). The active/running job would have the *queue_proc_id*,
> *queue_proc_number* and *queue_proc_time* set in the *sync_queue_item*
> table
> and the rest jobs with that queue id would be waiting for active job to
> complete. So, to delete pending jobs, records in the *sync_queue_item
> *table
> has to be cleared for the respective VMs, not the *sync_queue *table.
>
> I think, in your case, snapshots is taking long time and other jobs in that
> VM are pending for long time as they are in queue waiting for snapshot job
> to complete. What are the config values set for
> "job.cancel.threshold.minutes", "job.expire.minutes" and
> "volume.snapshot.job.cancel.threshold"? Are the jobs cancelled after the
> threshold time?
>
> Thanks,
> Suresh
>
> On Wed, Jan 23, 2019 at 7:14 PM Andrei Mikhailovsky
>  wrote:
>
> > Hi
> >
> > I've had this issue a few times in 2018 and managed to get it fixed
> pretty
> > easily, although had spent a number of hours initially trying to figure
> out
> > WTF is going on. This issue looks like one of those artefacts that
> creeped
> > up in one of the versions released in 2018 and hasn't been addressed by
> the
> > dev team.
> >
> > The way I fixed it was similar to what has been recommended earlier.
> > However, the difference was that I am sure I've looked at more tables
> than
> > just the two suggested. Basically, I've stopped the management server,
> > created the sql backup, connected to the sql db and listed all tables.
> > Grepped for the words like job/schedule/queue/sync. After that I've went
> > through all the tables and pretty much removed all the past / active /
> > awaiting execution jobs. I have started by looking at the vm related jobs
> > (the vm that I've tried to start but wasn't able to). This has worked
> once,
> > but the second time I had to remove a lot more jobs which relate to other
> > vms. After that I've started the management server and all went well from
> > there.
> >
> > What I have also noticed is that my snapshot jobs (I use KVM and Ceph)
> > seem to be blocking jobs on the hypervisor hosts which are running these
> > snapshots. So, if I am trying to perform various vm related jobs on a
> host
> > server which is currently running a snapshot process, that job will not
> be
> > executed until the snapshot process is done. I've tested this countless
> > number of times and it's still the case. Again, this issued appeared in
> one
> > of the 2018 releases as I've never seen between 2012 - 2017.
> >
> > Both issues are annoying as hell!
> >
> > Cheers
> >
> > - Original Message -
> > > From: "Alireza Eskandari" 
> > > To: "dev" 
> > > Sent: Wednesday, 23 January, 2019 12:40:48
> > > Subject: Re: Help! Jobs stuck in pending state
> >
> > > I'm following this issue in github:
> > > https://github.com/apache/cloudstack/issues/3104
> > > Please leave your comments
> > > Thanks
> > >
> > > On Wed, Jan 23, 2019 at 12:39 PM Wei ZHOU 
> wrote:
> > >
> > >> Hi Alireza,
> > >>
> > >> could you try again after restarting mgt server ?
> > >>
> > >> -Wei
> > >>
> > >> Alireza Eskandari  于2019年1月23日周三 上午6:22写道:
> > >>
> > >> > First I deleted two jobs which was existed in  vm_work_job table and
> > its
> > >> > related entry in  sync_queue table but it doesn't help.
> > >> > Then I delete all the entries in sync_queue 

Re: Help! Jobs stuck in pending state

2019-01-22 Thread Alireza Eskandari
First I deleted two jobs which was existed in  vm_work_job table and its
related entry in  sync_queue table but it doesn't help.
Then I delete all the entries in sync_queue tables and again no success.
Any idea?

On Wed, Jan 23, 2019 at 1:50 AM Wei ZHOU  wrote:

> If you know the instance id and mysql password, it should work after
> removing some records in mysql.
>
> ```
> set @id=X;
>
> delete from vm_work_job where vm_instance_id=@id;
> delete from sync_queue where sync_objid=@id;
> ```
>
> Alireza Eskandari  于2019年1月22日周二 下午10:59写道:
>
> > Hi guys
> > I have opened a bug in jira about my problem in CS:
> > https://issues.apache.org/jira/browse/CLOUDSTACK-10401
> > CloudStack doesn't process jobs! My cloud in totally unusable.
> > Thanks in advance for you help.
> >
>


Re: Help! Jobs stuck in pending state

2019-01-23 Thread Alireza Eskandari
I'm following this issue in github:
https://github.com/apache/cloudstack/issues/3104
Please leave your comments
Thanks

On Wed, Jan 23, 2019 at 12:39 PM Wei ZHOU  wrote:

> Hi Alireza,
>
> could you try again after restarting mgt server ?
>
> -Wei
>
> Alireza Eskandari  于2019年1月23日周三 上午6:22写道:
>
> > First I deleted two jobs which was existed in  vm_work_job table and its
> > related entry in  sync_queue table but it doesn't help.
> > Then I delete all the entries in sync_queue tables and again no success.
> > Any idea?
> >
> > On Wed, Jan 23, 2019 at 1:50 AM Wei ZHOU  wrote:
> >
> > > If you know the instance id and mysql password, it should work after
> > > removing some records in mysql.
> > >
> > > ```
> > > set @id=X;
> > >
> > > delete from vm_work_job where vm_instance_id=@id;
> > > delete from sync_queue where sync_objid=@id;
> > > ```
> > >
> > > Alireza Eskandari  于2019年1月22日周二 下午10:59写道:
> > >
> > > > Hi guys
> > > > I have opened a bug in jira about my problem in CS:
> > > > https://issues.apache.org/jira/browse/CLOUDSTACK-10401
> > > > CloudStack doesn't process jobs! My cloud in totally unusable.
> > > > Thanks in advance for you help.
> > > >
> > >
> >
>


Re: hook or callback for CloudStack API

2019-02-25 Thread Alireza Eskandari
I'm using vmware
Some actions such as adding secondary ip doesn't trigger hypervisor hooks

On Mon, Feb 25, 2019, 12:31 Dag Sonstebo  Alireza - which hypervisor do you use? If you use KVM you can use libvirt
> hooks - https://libvirt.org/hooks.html.
>
> Regards,
> Dag Sonstebo
> Cloud Architect
> ShapeBlue
>
>
> On 23/02/2019, 15:27, "Suresh Kumar Anaparti" <
> sureshkumar.anapa...@gmail.com> wrote:
>
> Hi Alireza,
>
> Other approach I can think of is database triggers (can impact
> performance
> based on the jobs frequency).
>
> Take a look at the async_job table's insert and update operations
> which are
> performed on creating a new job (job status 0) and updated when job is
> complete with non-zero job status (1 - success, 2 - failed, 3 -
> cancelled)
> respectively.
>
> https://dev.mysql.com/doc/refman/5.6/en/faqs-triggers.html  [a trigger
> could invoke the sys_exec() UDF.]
>
> Some ref for sys_exec UDF implementation below =>
> http://kedar.nitty-witty.com/blog/tag/sys_exec
>
> http://bernardodamele.blogspot.com/2009/01/command-execution-with-mysql-udf.html
>
> - Suresh
>
> On Sat, Feb 23, 2019 at 2:05 AM Alireza Eskandari <
> astro.alir...@gmail.com>
> wrote:
>
> > Async jobs is not my concern.
> > Imagine that you have a firewall that is not integrated with CS and
> you
> > want to insert new roles in it each time a new VM is created.
> > In this case you need a hook that triggers an external script to
> configure
> > the firewall.
> > Pulling is time and resource consuming and its effect is not instant.
> >
> > On Fri, Feb 22, 2019 at 8:02 PM Anurag Awasthi <
> > anurag.awas...@shapeblue.com>
> > wrote:
> >
> > > Hi Alireza,
> > >
> > > Could you elaborate a more on the use case you have in mind? The
> > > description you mention is very generic.
> > >
> > > As far as I know we need to use polling to track the status of any
> async
> > > job (which is another API call) and execute based on response.
> That seems
> > > to be foundation principle behind all async calls. Alternately,
> you can
> > > also use CloudMonkey (
> > >
> >
> https://cwiki.apache.org/confluence/display/CLOUDSTACK/CloudStack+cloudmonkey+CLI
> > )
> > > as a framework or dig a little into code there to implement a
> similar
> > > solution to execute hooks.
> > >
> > > Regards,
> > > Anurag
> > >
> > > On 2/22/19, 6:22 PM, "Alireza Eskandari" 
> > wrote:
> > >
> > > Hi,
> > > I'm looking for a solution to implement hooks or callbacks for
> > > CloudStack
> > > API.
> > > For example execute an script when user calls
> deployVirtualMachine
> > API.
> > > This script could be executed right after user submit his
> request or
> > > after
> > > the request completed successfully or failed.
> > > Maybe some API management solution could help me but the
> problem is
> > > understanding CS asyncjobs and their status.
> > > Thanks
> > >
> > >
> > >
> > > anurag.awas...@shapeblue.com
> > > www.shapeblue.com
> > > Amadeus House, Floral Street, London  WC2E 9DPUK
> > > @shapeblue
> > >
> > >
> > >
> > >
> >
>
>
>
> dag.sonst...@shapeblue.com
> www.shapeblue.com
> Amadeus House, Floral Street, London  WC2E 9DPUK
> @shapeblue
>
>
>
>


hook or callback for CloudStack API

2019-02-22 Thread Alireza Eskandari
Hi,
I'm looking for a solution to implement hooks or callbacks for CloudStack
API.
For example execute an script when user calls deployVirtualMachine API.
This script could be executed right after user submit his request or after
the request completed successfully or failed.
Maybe some API management solution could help me but the problem is
understanding CS asyncjobs and their status.
Thanks


Re: hook or callback for CloudStack API

2019-02-22 Thread Alireza Eskandari
Thank you Ivan!
A novel solution based on existing capabilities!
I'll investigate is for our needs.

On Fri, Feb 22, 2019 at 4:49 PM Ivan Kudryavtsev 
wrote:

> Hi, Alireza. Easy solution is to use Kafka or RMQ event bus, which are
> supported by cloudstack.
>
> Take a look on the article in our blog:
>
> https://bitworks.software/en/2017-07-23-cloudstack-3rd-party-integration-events-subscription-kafka.html
>
> We use it very extensively for accounting, billing, DNS integration, etc.
>
> пт, 22 февр. 2019 г., 7:52 Alireza Eskandari astro.alir...@gmail.com:
>
> > Hi,
> > I'm looking for a solution to implement hooks or callbacks for CloudStack
> > API.
> > For example execute an script when user calls deployVirtualMachine API.
> > This script could be executed right after user submit his request or
> after
> > the request completed successfully or failed.
> > Maybe some API management solution could help me but the problem is
> > understanding CS asyncjobs and their status.
> > Thanks
> >
>


Re: hook or callback for CloudStack API

2019-02-22 Thread Alireza Eskandari
Async jobs is not my concern.
Imagine that you have a firewall that is not integrated with CS and you
want to insert new roles in it each time a new VM is created.
In this case you need a hook that triggers an external script to configure
the firewall.
Pulling is time and resource consuming and its effect is not instant.

On Fri, Feb 22, 2019 at 8:02 PM Anurag Awasthi 
wrote:

> Hi Alireza,
>
> Could you elaborate a more on the use case you have in mind? The
> description you mention is very generic.
>
> As far as I know we need to use polling to track the status of any async
> job (which is another API call) and execute based on response. That seems
> to be foundation principle behind all async calls. Alternately, you can
> also use CloudMonkey (
> https://cwiki.apache.org/confluence/display/CLOUDSTACK/CloudStack+cloudmonkey+CLI)
> as a framework or dig a little into code there to implement a similar
> solution to execute hooks.
>
> Regards,
> Anurag
>
> On 2/22/19, 6:22 PM, "Alireza Eskandari"  wrote:
>
> Hi,
> I'm looking for a solution to implement hooks or callbacks for
> CloudStack
> API.
> For example execute an script when user calls deployVirtualMachine API.
> This script could be executed right after user submit his request or
> after
> the request completed successfully or failed.
> Maybe some API management solution could help me but the problem is
> understanding CS asyncjobs and their status.
> Thanks
>
>
>
> anurag.awas...@shapeblue.com
> www.shapeblue.com
> Amadeus House, Floral Street, London  WC2E 9DPUK
> @shapeblue
>
>
>
>


Cross cluster cold migration failed in vmware

2019-04-23 Thread Alireza Eskandari
Hi guys,
I face with a problem in old migration of VMs between 2 cluster.
If you stop a VM in 1st cluster, then you try to start it on a host in 2nd
cluster, you will get "The specified key, name, or identifier already
exists." error from VMWare.
I have opened an issue in CloudStack github about it:
https://github.com/apache/cloudstack/issues/3285
I'm looking for a workaround. How can I prevent CloudStack to start VM in
other clusters?
Regards


Re: Calling scaleVirtualMachine fails due to incorrect power state examination

2019-12-08 Thread Alireza Eskandari
Yes, as we told in github issue, we have test that api and it works fine.
As soon as VM state changes to stopped, the changeServiceForVirtualMachine
scales VM without any issue.
But changeServiceForVirtualMachine don't support live upgrade of VM, it
asks us to stop VM in any circumstance.

On Sun, Dec 8, 2019 at 9:56 PM Wei ZHOU  wrote:

> try another api?
>
>
> https://cloudstack.apache.org/api/apidocs-4.13/apis/changeServiceForVirtualMachine.html
>
> On Sunday, 8 December 2019, Alireza Eskandari 
> wrote:
>
> > No, I try to power off the VM from CS.
> >
> > On Sun, Dec 8, 2019 at 9:49 PM Andrija Panic 
> > wrote:
> >
> > > This is happening when VM is stopped out of band (outside CloudStack)?
> > >
> > > On Sun, 8 Dec 2019, 18:12 Alireza Eskandari, 
> > > wrote:
> > >
> > > > Hi guys,
> > > > Recently we try to upgrade our infra from 4.9 to 4.13
> > > > As we check the new version of CS in our lab, we face with a problem
> > > about
> > > > scaling VMs.
> > > > For example I shutdown a VM before downgrade, then I check its state
> to
> > > > ensure it is stopped.
> > > > After VM is fully stopped, (by checking listVirtualMachine API) I
> call
> > > > scaleVirtualMachine to downgrade it but I get error which says that
> VM
> > is
> > > > not stopped.
> > > > After a while (about 30s to 1min) I retry to downgrade it but this
> > > > everything goes as expected without error.
> > > > My investigation shows that a change from CS 4.9 is the root cause of
> > > this
> > > > problem.
> > > > I submit this problem as an issue in github:
> > > > https://github.com/apache/cloudstack/issues/3749
> > > > It will be nice if you resolve this bug in future release of CS 4.13.
> > > > Regards,
> > > > Alireza
> > > >
> > >
> >
>


Re: Calling scaleVirtualMachine fails due to incorrect power state examination

2019-12-08 Thread Alireza Eskandari
No, I try to power off the VM from CS.

On Sun, Dec 8, 2019 at 9:49 PM Andrija Panic 
wrote:

> This is happening when VM is stopped out of band (outside CloudStack)?
>
> On Sun, 8 Dec 2019, 18:12 Alireza Eskandari, 
> wrote:
>
> > Hi guys,
> > Recently we try to upgrade our infra from 4.9 to 4.13
> > As we check the new version of CS in our lab, we face with a problem
> about
> > scaling VMs.
> > For example I shutdown a VM before downgrade, then I check its state to
> > ensure it is stopped.
> > After VM is fully stopped, (by checking listVirtualMachine API) I call
> > scaleVirtualMachine to downgrade it but I get error which says that VM is
> > not stopped.
> > After a while (about 30s to 1min) I retry to downgrade it but this
> > everything goes as expected without error.
> > My investigation shows that a change from CS 4.9 is the root cause of
> this
> > problem.
> > I submit this problem as an issue in github:
> > https://github.com/apache/cloudstack/issues/3749
> > It will be nice if you resolve this bug in future release of CS 4.13.
> > Regards,
> > Alireza
> >
>


Calling scaleVirtualMachine fails due to incorrect power state examination

2019-12-08 Thread Alireza Eskandari
Hi guys,
Recently we try to upgrade our infra from 4.9 to 4.13
As we check the new version of CS in our lab, we face with a problem about
scaling VMs.
For example I shutdown a VM before downgrade, then I check its state to
ensure it is stopped.
After VM is fully stopped, (by checking listVirtualMachine API) I call
scaleVirtualMachine to downgrade it but I get error which says that VM is
not stopped.
After a while (about 30s to 1min) I retry to downgrade it but this
everything goes as expected without error.
My investigation shows that a change from CS 4.9 is the root cause of this
problem.
I submit this problem as an issue in github:
https://github.com/apache/cloudstack/issues/3749
It will be nice if you resolve this bug in future release of CS 4.13.
Regards,
Alireza


Playing with CS code

2020-03-14 Thread Alireza Eskandari
Hi,
The self isolation due to COVID-19, has been motivated me to learn
development of CS code :)
I'm not a java developer, but it can get rid of it.
I have deployed an IDE based on eclipse. Till now everything is working
fine. I can trace the code, build, debug and run it from eclipse. Something
that is very confusing for me is the amount of projects inside of CS. How
can I know how to use them? There are many classes that I don't even aware
of their existence! If you have any documents or resources about it, I will
appreciate to share it with me.
Thanks


CloudStack quotas

2020-04-29 Thread Alireza Eskandari
Hi,
I'm investigating quotas plugin of CloudStack 4.13.
It seems that when an account credit is running out, CloudStack doesn't
lock account automatically.
Is it a bug or I need to any action about this?
Also I'm looking for a solution to charge users base on using different
service offerings or different storage type (based on tags).
Any suggestions?
Thanks


Re: Goggle Summer of Code 2021

2021-03-12 Thread Alireza Eskandari
Hi
I think writing a Container Storage Interface (CSI) for Kubernetes could be
a good idea.
Regards

On Tue, Feb 16, 2021 at 1:00 PM Giles Sirett 
wrote:

> Hi all
>
> It would be great if the CloudStack project were able to get a few Google
> Summer of Code  [1] students this year to work on projects within our
> community. We've had a number of previous GSoC students (examples at [2] ),
> who have worked on innovative features/ projects within cloudstack and have
> then gone on to become significant contributors to Cloudstack .
>
>
> In order to be able to attract students to work on Cloudstack, we need 2
> things:
>
>   1.  A number of candidate projects for students to work on. Students
> browse all GSoC the candidate projects and choose one that interests them-
> effectively every organisation is competing for the students interest.
> These projects therefore need to be reasonably interesting looking projects
> to attract potential students. The students spend approximately 9 weeks
> coding, so the projects need to be appropriately scaled
>   2.  Somebody prepared to mentor the student throughout the duration of
> the project (usually the person who suggests the project)
>
> The student application period starts 29 March [3]
> The ASF  has registered itself as a mentor  organisation with Google ,
> allowing individual Apache projects to list candidate projects  for
> students to work on. A wiki page [4]  has been created at the ASF level to
> allow ASF projects to  list their ideas for students
>
>
> I'm happy to coordinate this from a Cloudstack perspective.
> If others are happy with this approach, then I ask for two things at this
> stage:
>
>
>   1.  Could people suggest appropriate projects. This could be a piece of
> integration that you've always considered and not got around to or could be
> an improvement that you've always wanted to do. If people can reply to this
> thread with ANY ideas, it would be a good start (irrespective of whether
> you wish to be a mentor or not)
>   2.  At the same time, could people say whether they'd be prepared to be
> a student mentor or not
>
>
>
>
> [1] https://summerofcode.withgoogle.com/
>
>
> [2]
>
> https://blog.netapp.com/blogs/mentoring-with-google-summer-of-code-and-lessons-in-cloudstack/
> https://dzone.com/articles/cloudstack-google-summer-code
>
> https://opensource.googleblog.com/2014/07/gsoc-students-create-google-compute.html
>
>
> [3]https://summerofcode.withgoogle.com/how-it-works/#timeline
>
> [4]
> https://cwiki.apache.org/confluence/display/COMDEV/GSoC+2021+Ideas+list
>
>
>
> Kind regards
> Giles
>
>
> giles.sir...@shapeblue.com
> www.shapeblue.com
> 3 London Bridge Street,  3rd floor, News Building, London  SE1 9SGUK
> @shapeblue
>
>
>
>


Re: Goggle Summer of Code 2021

2021-03-12 Thread Alireza Eskandari
>From a technical viewpoint and low level operations in hypervisor, does it
need something more than detaching disk from source VM and attaching it to
destination VM that has already been implemented in CloudStack? Also these
features can be available for CSI because CloudStack support it:
Raw Blcok, Snapshot, Expansion, Cloning
But a volume in CloudStack can only operate in Read/Write Single Pod mode
not multiple pods.
You can see a list of already developed CSIs in this link:
https://kubernetes-csi.github.io/docs/drivers.html
Regards


Re: Goggle Summer of Code 2021

2021-03-15 Thread Alireza Eskandari
Hi Wei
I had a search among different CSI drivers and their corresponding cloud
providers API, I can say that your opinion is not right!
For example in Hetzner cloud CSI driver you can see the
"ControllerPublishVolume" function calls "s.volumeService.Attach" that
tells Hetzner cloud manager to attach a virtual disk to the VM that the pod
is hosting on it:
https://github.com/hetznercloud/csi-driver/blob/16d7f9af6a3ac9a0a4e35c5b640c5ace9d7b45e7/driver/controller.go#L159
Also other features for PV is handled by calling corresponding APIs for
virtual disk in Hetzner cloud.
Since the functionality of volume service in Hetzner cloud is similar to
CloudStack volume, I think that we can do the same for CloudStack CSI
driver.
Regards,
Alireza

On Sat, Mar 13, 2021 at 2:14 PM Wei ZHOU  wrote:

> Thanks Alireza.
> It is a long list. Almost all drivers in the list are for block storage
> solutions or file shares. containers can access the resources directly.
>
> Different to them, cloudstack volumes are attached to VMs, not to pods or
> containers. containers cannot attach cloudstack volumes. All IaaS platforms
> have the same problem.
> In the list there are no drivers for other IaaS projects (openstack,
> opennebula, etc) and public cloud providers (amazon ec2, google gcp or
> azure compute, etc).
>
> In my opinion, CSI drivers should be implemented by storage providers , not
> cloud providers.
>
> -Wei
>
>
>
>
> On Fri, 12 Mar 2021 at 21:56, Alireza Eskandari 
> wrote:
>
> > From a technical viewpoint and low level operations in hypervisor, does
> it
> > need something more than detaching disk from source VM and attaching it
> to
> > destination VM that has already been implemented in CloudStack? Also
> these
> > features can be available for CSI because CloudStack support it:
> > Raw Blcok, Snapshot, Expansion, Cloning
> > But a volume in CloudStack can only operate in Read/Write Single Pod mode
> > not multiple pods.
> > You can see a list of already developed CSIs in this link:
> > https://kubernetes-csi.github.io/docs/drivers.html
> > Regards
> >
>


Re: Goggle Summer of Code 2021

2021-03-15 Thread Alireza Eskandari
Yes!
Right now I have created a kubernetes cluster in Hetzner cloud and tested
its CSI driver. As I expected, it works by attaching and detaching volumes
from VM to VM. The volume follows where the pod is scheduled.
I can give you access to evaluate it if you like.
Thanks


On Mon, Mar 15, 2021 at 1:10 PM Wei ZHOU  wrote:

> Hi Alireza,
>
> Do you mean the Herzner cloud volume
> https://docs.hetzner.com/cloud/volumes/faq/ ?
>
> -Wei
>
> On Mon, 15 Mar 2021 at 09:50, Alireza Eskandari 
> wrote:
>
> > Hi Wei
> > I had a search among different CSI drivers and their corresponding cloud
> > providers API, I can say that your opinion is not right!
> > For example in Hetzner cloud CSI driver you can see the
> > "ControllerPublishVolume" function calls "s.volumeService.Attach" that
> > tells Hetzner cloud manager to attach a virtual disk to the VM that the
> pod
> > is hosting on it:
> >
> >
> https://github.com/hetznercloud/csi-driver/blob/16d7f9af6a3ac9a0a4e35c5b640c5ace9d7b45e7/driver/controller.go#L159
> > Also other features for PV is handled by calling corresponding APIs for
> > virtual disk in Hetzner cloud.
> > Since the functionality of volume service in Hetzner cloud is similar to
> > CloudStack volume, I think that we can do the same for CloudStack CSI
> > driver.
> > Regards,
> > Alireza
> >
> > On Sat, Mar 13, 2021 at 2:14 PM Wei ZHOU  wrote:
> >
> > > Thanks Alireza.
> > > It is a long list. Almost all drivers in the list are for block storage
> > > solutions or file shares. containers can access the resources directly.
> > >
> > > Different to them, cloudstack volumes are attached to VMs, not to pods
> or
> > > containers. containers cannot attach cloudstack volumes. All IaaS
> > platforms
> > > have the same problem.
> > > In the list there are no drivers for other IaaS projects (openstack,
> > > opennebula, etc) and public cloud providers (amazon ec2, google gcp or
> > > azure compute, etc).
> > >
> > > In my opinion, CSI drivers should be implemented by storage providers ,
> > not
> > > cloud providers.
> > >
> > > -Wei
> > >
> > >
> > >
> > >
> > > On Fri, 12 Mar 2021 at 21:56, Alireza Eskandari <
> astro.alir...@gmail.com
> > >
> > > wrote:
> > >
> > > > From a technical viewpoint and low level operations in hypervisor,
> does
> > > it
> > > > need something more than detaching disk from source VM and attaching
> it
> > > to
> > > > destination VM that has already been implemented in CloudStack? Also
> > > these
> > > > features can be available for CSI because CloudStack support it:
> > > > Raw Blcok, Snapshot, Expansion, Cloning
> > > > But a volume in CloudStack can only operate in Read/Write Single Pod
> > mode
> > > > not multiple pods.
> > > > You can see a list of already developed CSIs in this link:
> > > > https://kubernetes-csi.github.io/docs/drivers.html
> > > > Regards
> > > >
> > >
> >
>


Re: Goggle Summer of Code 2021

2021-03-13 Thread Alireza Eskandari
So based on your message those storages should be available to containers
on some kind of protocols over network, NFS for instance.
I thought that we can attach a virtual disk to the VM that hosts the pod,
and then directly attach it to the pod. In case of pod migration, we can
detach the disk and attach it to another VM.


On Sat, Mar 13, 2021 at 2:14 PM Wei ZHOU  wrote:

> Thanks Alireza.
> It is a long list. Almost all drivers in the list are for block storage
> solutions or file shares. containers can access the resources directly.
>
> Different to them, cloudstack volumes are attached to VMs, not to pods or
> containers. containers cannot attach cloudstack volumes. All IaaS platforms
> have the same problem.
> In the list there are no drivers for other IaaS projects (openstack,
> opennebula, etc) and public cloud providers (amazon ec2, google gcp or
> azure compute, etc).
>
> In my opinion, CSI drivers should be implemented by storage providers , not
> cloud providers.
>
> -Wei
>
>
>
>
> On Fri, 12 Mar 2021 at 21:56, Alireza Eskandari 
> wrote:
>
> > From a technical viewpoint and low level operations in hypervisor, does
> it
> > need something more than detaching disk from source VM and attaching it
> to
> > destination VM that has already been implemented in CloudStack? Also
> these
> > features can be available for CSI because CloudStack support it:
> > Raw Blcok, Snapshot, Expansion, Cloning
> > But a volume in CloudStack can only operate in Read/Write Single Pod mode
> > not multiple pods.
> > You can see a list of already developed CSIs in this link:
> > https://kubernetes-csi.github.io/docs/drivers.html
> > Regards
> >
>