Re: AJAX video stream for VM console is broken in Chrome

2016-08-18 Thread Sergey Levitskiy
Hi Rohit,
As it turned out ACS 4.9 is fine and issue is only in ACP/CCP 4.7 which I 
believe is pretty close to ACS 4.7. Interestingly enough if I copy console URL 
and open a tab in main Chrome window it works just fine. I took 3 more 
screenshots of Chrome Development tools to compare. It looks like Chrome for 
whatever reason block returned Ajax stream to the popup window after the very 
first frame. 

https://autodesk.box.com/s/psudrtjq09ke3p6t08ft2700l96govkg
https://autodesk.box.com/s/gn8gd1ieqmsq9yx1fzdopj4dycp3gm0u
https://autodesk.box.com/s/5sklr6sli7pgy1ar26l3vps0n8pzoa60

Thanks,
Sergey



On 8/18/16, 1:37 AM, "Rohit Yadav"  wrote:

Hi Sergey,


Can you open console in Chrome and then click on Tools-> Developer Tools. 
It would open a separate window from where you can debug what's going wrong. In 
the developer tools window, head over to the console tab and share if you're 
seeing any errors. Head over to the network tab, where you can ajax? and 
ajaximg? url requests being made, if you're not seeing any such URL 
requests/activities perhaps there was an issue with loading resources from the 
embedded iframe. To debug this, head over to the 'Elements' tab, click on 
iframset and copy the iframe src url. Try to open this URL in Chrome in a 
separate tab. It might fail to load due to SSL/TLS certificate error or any 
other network configuration.


Can you also share your OS details, Chrome version and CloudStack version. 
Are you using SSL certificates with console proxy? If so can you check that 
they are valid and resolve to a valid hostname/ip for which the certificate was 
generated and/or fix as necessary. If you're using a custom CA, make sure to 
import the root CA certificate in Chrome.


Regards.

rohit.ya...@shapeblue.com 
www.shapeblue.com
53 Chandos Place, Covent Garden, London  WC2N 4HSUK
@shapeblue
  
 





Virtual Router execute python slowly

2016-08-18 Thread Gust

Hi,all 

we constructed a advance network in cloudstack , it work fine early , but when 
I added some VR rules ,it execute slow more and more.

About total 100 rules already exist ,  I add a port forward rule , it would 
execute about 3 minutes , that we changed the agent source  set more seconds 
timeout ,else agent will timeout at 120s,  and optimized CsAddress.py in VR.

So I login to VR vm , and  modify the update_config.pywith  cProfile , and 
print out execute result . because add cProfile , python execute more than 8 
min.

It shows too many netaddr  object init invoked.

vr hypervisor hardware :   E3 1230v2  3.4GHz   , vr alloc 3GHz

--
Optimized CsAddress.py , execute 3 min, else 5 min

CsAddress.py (line 145)
   def ip_in_subnet(self, ip):
   ipo = IPAddress(ip) 
   net = IPNetwork("%s/%s" % (self.get_ip(), self.get_size()))
   aset = set(net)
   return  ipo in aset

--
def mainp():
   if not (os.path.isfile(jsonCmdConfigPath) and os.access(jsonCmdConfigPath, 
os.R_OK)):
   print "[ERROR] update_config.py :: You are telling me to process %s, but 
i can't access it" % jsonCmdConfigPath
   sys.exit(1)

   # If the command line json file is unprocessed process it
   # This is important or, the control interfaces will get deleted!
   if os.path.isfile(jsonPath % "cmd_line.json"):
   qf = QueueFile()
   qf.setFile("cmd_line.json")
   qf.load(None)

   # If the guest network is already configured and have the same IP, do not 
try to configure it again otherwise it will break
   if sys.argv[1] == "guest_network.json":
   if os.path.isfile(currentGuestNetConfig):
   file = open(currentGuestNetConfig)
   guestnet_dict = json.load(file)

   if not is_guestnet_configured(guestnet_dict, ['eth1', 'eth2', 
'eth3', 'eth4', 'eth5', 'eth6', 'eth7', 'eth8', 'eth9']):
   print "[INFO] update_config.py :: Processing Guest Network."
   process_file()
   else:
   print "[INFO] update_config.py :: No need to process Guest 
Network."
   finish_config()
   else:
   print "[INFO] update_config.py :: No GuestNetwork configured yet. 
Configuring first one now."
   process_file()
   else:
   print "[INFO] update_config.py :: Processing incoming file => %s" % 
sys.argv[1]
   process_file()

cProfile.run("mainp()", "/var/log/py_pro.data”)

--

Fri Aug 19 11:27:50 2016d:\temp\py_pro.data

614887355 function calls (614884838 primitive calls) in 548.846 seconds

  Ordered by: internal time

  ncalls  tottime  percall  cumtime  percall filename:lineno(function)
68177344  182.9250.000  277.0510.000 __init__.py:248(__init__)
68170816   65.4350.000  342.4270.000 __init__.py:1682(iter_iprange)
68170816   54.6550.000  140.1860.000 __init__.py:63(__hash__)
1088   53.9360.050  536.6650.493 CsAddress.py:145(ip_in_subnet)
68170976   48.5770.000   69.1120.000 __init__.py:439(key)
68187121   42.9760.000   42.9760.000 {hasattr}
68188576   26.2020.000   26.2050.000 {isinstance}
68178432   24.9450.000   24.9450.000 __init__.py:34(__init__)
68177504   20.5370.000   20.5370.000 __init__.py:232(version)
68170816   16.4190.000   16.4190.000 {hash}
  325.8690.183  351.378   10.981 configure.py:747(getNetworkByIp)
  483.6850.077  194.8454.059 configure.py:741(getDeviceByIp)
23521.0210.0001.0210.000 {built-in method poll}
  2454410.3520.0000.5100.000 CsNetfilter.py:296(__eq__)
21490.2510.0000.2510.000 {posix.read}
 7980.1110.0000.6080.001 CsNetfilter.py:116(has_rule)
  4935850.0980.0000.0980.000 CsNetfilter.py:258(get_table)
 3290.0770.0000.0770.000 {posix.fork}
24440.0590.0000.0590.000 {method 'flush' of 'file' objects}
24440.0390.0000.0740.000 __init__.py:243(__init__)
  1139500.0300.0000.0300.000 CsNetfilter.py:270(get_chain)
 3290.0280.0000.3670.001 subprocess.py:1195(_execute_child)
24440.0210.0000.0780.000 __init__.py:458(format)
20690.0210.0000.0390.000 
CsNetfilter.py:236(__convert_to_dict)
   10.0200.0201.5221.522 CsNetfilter.py:134(compare)
24440.0170.0000.0240.000 __init__.py:1226(findCaller)
24440.0160.0000.0170.000 __init__.py:318(getMessage)
   417630.0150.0000.0150.000 {method 'items' of 'dict' objects}
24440.0150.0000.0150.000 {time.localtime}
10880.0140.0000.0280.000 __init__.py:737(parse_ip_network)
24440.013

Virtual Router execute python slowly

2016-08-18 Thread Gust

Hi,all 

we constructed a advance network in cloudstack , it work fine early , but when 
I added some VR rules ,it execute slow more and more.

About total 100 rules already exist ,  I add a port forward rule , it would 
execute about 3 minutes , that we changed the agent source  set more seconds 
timeout ,else agent will timeout at 120s,  and optimized CsAddress.py in VR.

So I login to VR vm , and  modify the update_config.pywith  cProfile , and 
print out execute result . because add cProfile , python execute more than 8 
min.

It shows too many netaddr  object init invoked.

vr hypervisor hardware :   E3 1230v2  3GHz 

--
Optimized CsAddress.py , execute 3 min, else 5 min

CsAddress.py (line 145)
def ip_in_subnet(self, ip):
ipo = IPAddress(ip) 
net = IPNetwork("%s/%s" % (self.get_ip(), self.get_size()))
aset = set(net)
return  ipo in aset

--
def mainp():
if not (os.path.isfile(jsonCmdConfigPath) and os.access(jsonCmdConfigPath, 
os.R_OK)):
print "[ERROR] update_config.py :: You are telling me to process %s, 
but i can't access it" % jsonCmdConfigPath
sys.exit(1)

# If the command line json file is unprocessed process it
# This is important or, the control interfaces will get deleted!
if os.path.isfile(jsonPath % "cmd_line.json"):
qf = QueueFile()
qf.setFile("cmd_line.json")
qf.load(None)

# If the guest network is already configured and have the same IP, do not 
try to configure it again otherwise it will break
if sys.argv[1] == "guest_network.json":
if os.path.isfile(currentGuestNetConfig):
file = open(currentGuestNetConfig)
guestnet_dict = json.load(file)

if not is_guestnet_configured(guestnet_dict, ['eth1', 'eth2', 
'eth3', 'eth4', 'eth5', 'eth6', 'eth7', 'eth8', 'eth9']):
print "[INFO] update_config.py :: Processing Guest Network."
process_file()
else:
print "[INFO] update_config.py :: No need to process Guest 
Network."
finish_config()
else:
print "[INFO] update_config.py :: No GuestNetwork configured yet. 
Configuring first one now."
process_file()
else:
print "[INFO] update_config.py :: Processing incoming file => %s" % 
sys.argv[1]
process_file()

cProfile.run("mainp()", "/var/log/py_pro.data”)

--

Fri Aug 19 11:27:50 2016d:\temp\py_pro.data

 614887355 function calls (614884838 primitive calls) in 548.846 seconds

   Ordered by: internal time

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
 68177344  182.9250.000  277.0510.000 __init__.py:248(__init__)
 68170816   65.4350.000  342.4270.000 __init__.py:1682(iter_iprange)
 68170816   54.6550.000  140.1860.000 __init__.py:63(__hash__)
 1088   53.9360.050  536.6650.493 CsAddress.py:145(ip_in_subnet)
 68170976   48.5770.000   69.1120.000 __init__.py:439(key)
 68187121   42.9760.000   42.9760.000 {hasattr}
 68188576   26.2020.000   26.2050.000 {isinstance}
 68178432   24.9450.000   24.9450.000 __init__.py:34(__init__)
 68177504   20.5370.000   20.5370.000 __init__.py:232(version)
 68170816   16.4190.000   16.4190.000 {hash}
   325.8690.183  351.378   10.981 configure.py:747(getNetworkByIp)
   483.6850.077  194.8454.059 configure.py:741(getDeviceByIp)
 23521.0210.0001.0210.000 {built-in method poll}
   2454410.3520.0000.5100.000 CsNetfilter.py:296(__eq__)
 21490.2510.0000.2510.000 {posix.read}
  7980.1110.0000.6080.001 CsNetfilter.py:116(has_rule)
   4935850.0980.0000.0980.000 CsNetfilter.py:258(get_table)
  3290.0770.0000.0770.000 {posix.fork}
 24440.0590.0000.0590.000 {method 'flush' of 'file' objects}
 24440.0390.0000.0740.000 __init__.py:243(__init__)
   1139500.0300.0000.0300.000 CsNetfilter.py:270(get_chain)
  3290.0280.0000.3670.001 subprocess.py:1195(_execute_child)
 24440.0210.0000.0780.000 __init__.py:458(format)
 20690.0210.0000.0390.000 
CsNetfilter.py:236(__convert_to_dict)
10.0200.0201.5221.522 CsNetfilter.py:134(compare)
 24440.0170.0000.0240.000 __init__.py:1226(findCaller)
 24440.0160.0000.0170.000 __init__.py:318(getMessage)
417630.0150.0000.0150.000 {method 'items' of 'dict' objects}
 24440.0150.0000.0150.000 {time.localtime}
 10880.0140.0000.028

[GitHub] cloudstack issue #1642: System VMs on Managed Storage

2016-08-18 Thread mike-tutkowski
Github user mike-tutkowski commented on the issue:

https://github.com/apache/cloudstack/pull/1642
  
@jburwell Have we as a community defined what a test review must encompass? 
Is there a set of particular tests that must generally be run for each PR?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack issue #1642: System VMs on Managed Storage

2016-08-18 Thread jburwell
Github user jburwell commented on the issue:

https://github.com/apache/cloudstack/pull/1642
  
@mike-tukowski any committer may merge a PR with at least one code review 
LGTM, at least one test LGTM, and no -1s.  For this PR, I don't see a test LGTM 
with test results.  Until it has at least one test LGTM, it is *not* ready to 
merge.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


RE: Hiding buttons based on role

2016-08-18 Thread Marty Godsey
That would be great. I think adding the ability hide GUI elements based on role 
inside the GUI would be a great step.

Regards,
Marty Godsey

-Original Message-
From: Rashmi Dixit [mailto:rashmi_di...@accelerite.com] 
Sent: Thursday, August 18, 2016 8:15 AM
To: dev@cloudstack.apache.org
Subject: RE: Hiding buttons based on role

Hi Marty,

We could add an "actionPreFilter" for "actions" defined in the widgets which 
will filter out the buttons based on role.

There are preFilters already implemented for fields in a listView - we need to 
follow the same principle. We need to check for this filter where the buttons 
are built in the listView (look for "if (listViewData.actions) {" in 
listView.js).

Hope this helps! 
Rashmi



-Original Message-
From: Marty Godsey [mailto:ma...@gonsource.com]
Sent: Thursday, August 18, 2016 6:04 AM
To: dev@cloudstack.apache.org
Subject: RE: Hiding buttons based on role

Not elegant but will work. This is not a one off to a degree. It's for my own 
servers but I will have at least 10-20 management server across the country in 
different zones  but this allows me to "hide" some elements that won't be used 
until a more elegant way is created/available.

Thank you for the direction Will.

Regards,
Marty Godsey

-Original Message-
From: Will Stevens [mailto:williamstev...@gmail.com]
Sent: Wednesday, August 17, 2016 8:29 PM
To: dev@cloudstack.apache.org
Subject: RE: Hiding buttons based on role

If I was doing a one off solution for my own use case with a limited scope, I 
would do it he following.

Apply a CSS class to the  tag which corresponds to the role. Then I would 
use CSS to 'display:none' on the elements you want to turn off by referencing 
the body role class (and keep the permissions applied so if they unhide it 
won't work).

It is not an elegant solution, but it will work.

On Aug 17, 2016 8:19 PM, "Marty Godsey"  wrote:

>

> Ok. Thank you.
>
> I think for the time being I will enable all the project APIs again 
> but
deny access to create a project.. this way at least he API errors on page load 
go away.
>
> This is something I think would be nice to have in the permissions 
> area
now since we have granular rules. A way to "turn off" certain areas of the GUI 
and/or ACS functionality.
>
> Regards,
> Marty Godsey
>
> -Original Message-
> From: Will Stevens [mailto:williamstev...@gmail.com]
> Sent: Wednesday, August 17, 2016 8:10 PM
> To: dev@cloudstack.apache.org
> Subject: RE: Hiding buttons based on role
>
> Yes. Most of the UI is built using huge json structures. These will 
> need
to be adapted to account for a user's role. I don't think there has been work 
done on that yet, but I could be wrong.
>
> @rohit, do you know if anyone has looked into this at all yet?
>
> On Aug 17, 2016 7:41 PM, "Marty Godsey"  wrote:
>
> > With that being said, we are now getting into the area of UI 
> > modification to hide the button huh?
> >
> > Regards,
> > Marty Godsey
> >
> > -Original Message-
> > From: Will Stevens [mailto:williamstev...@gmail.com]
> > Sent: Wednesday, August 17, 2016 7:23 PM
> > To: dev@cloudstack.apache.org
> > Subject: Re: Hiding buttons based on role
> >
> > My understanding is that the permissions can be set, but they 
> > currently do not modify the UI in any way. I believe what you are 
> > experiencing is the expected behavior.
> >
> > Cheers,
> >
> > Will
> >
> > On Aug 17, 2016 6:47 PM, "Marty Godsey"  wrote:
> >
> > > Is it possible to hide a button based upon a role? As an example I 
> > > want to hide and deny access to the projects tab. I can modify the 
> > > role access to the API but the button is still present. In fact I 
> > > get an API error that states I don't have access.
> > >
> > > Regards,
> > > Marty Godsey
> > >
> > >
> >



DISCLAIMER
==
This e-mail may contain privileged and confidential information which is the 
property of Accelerite, a Persistent Systems business. It is intended only for 
the use of the individual or entity to which it is addressed. If you are not 
the intended recipient, you are not authorized to read, retain, copy, print, 
distribute or use this message. If you have received this communication in 
error, please notify the sender and delete all copies of this message. 
Accelerite, a Persistent Systems business does not accept any liability for 
virus infected mails.


RE: Editable Documentation

2016-08-18 Thread Marty Godsey
Thank you Will. I will look at this now.

Regards,
Marty Godsey

-Original Message-
From: williamstev...@gmail.com [mailto:williamstev...@gmail.com] On Behalf Of 
Will Stevens
Sent: Thursday, August 18, 2016 5:21 PM
To: dev@cloudstack.apache.org
Subject: Re: Editable Documentation

Marty, here are the docs:
https://github.com/apache?utf8=%E2%9C%93=cloudstack

As you can see there are quite a few different locations.  If you send me a 
link to the docs you are referring to, I can point you towards which repo it is 
built from.

The docs are built as static websites from the formatted text files in these 
repos.

Just ask if you have problems building the docs.

Cheers,

*Will STEVENS*
Lead Developer

*CloudOps* *| *Cloud Solutions Experts
420 rue Guy *|* Montreal *|* Quebec *|* H3J 1S6 w cloudops.com *|* tw @CloudOps_

On Thu, Aug 18, 2016 at 5:16 PM, Simon Weller  wrote:

> Marty,
>
>
> I think Will is asking what ACS docs you are wanting in an editable format.
>
>
> - Si
>
>
> 
> From: Marty Godsey 
> Sent: Thursday, August 18, 2016 4:11 PM
> To: dev@cloudstack.apache.org
> Subject: RE: Editable Documentation
>
> Yes,,, however I would like to add branding.
>
> Regards,
> Marty Godsey
>
> -Original Message-
> From: williamstev...@gmail.com [mailto:williamstev...@gmail.com] On 
> Behalf Of Will Stevens
> Sent: Thursday, August 18, 2016 5:08 PM
> To: dev@cloudstack.apache.org
> Subject: Re: Editable Documentation
>
> can you link to the documentation you are referencing?
>
> *Will STEVENS*
> Lead Developer
>
> *CloudOps* *| *Cloud Solutions Experts
> 420 rue Guy *|* Montreal *|* Quebec *|* H3J 1S6 w cloudops.com *|* tw 
> @CloudOps_
>
> On Thu, Aug 18, 2016 at 4:53 PM, Marty Godsey  wrote:
>
> > Is there an editable form of the documentation? Like a Word Doc or 
> > something? I know I can download the HTML and go through it but was 
> > wondering if there was a less "tedious" way.
> >
> > Regards,
> > Marty Godsey
> >
> >
>


RE: Editable Documentation

2016-08-18 Thread Marty Godsey
I see. Thank you Simon. I also just received the email from Will. Let me see 
what I can do. I appreciate all the help. If any of the developers are ever in 
Lexington KY let me know.. Beers are on me.

Regards,
Marty Godsey

-Original Message-
From: Simon Weller [mailto:swel...@ena.com] 
Sent: Thursday, August 18, 2016 5:16 PM
To: dev@cloudstack.apache.org
Subject: Re: Editable Documentation

Marty,


I think Will is asking what ACS docs you are wanting in an editable format.


- Si



From: Marty Godsey 
Sent: Thursday, August 18, 2016 4:11 PM
To: dev@cloudstack.apache.org
Subject: RE: Editable Documentation

Yes,,, however I would like to add branding.

Regards,
Marty Godsey

-Original Message-
From: williamstev...@gmail.com [mailto:williamstev...@gmail.com] On Behalf Of 
Will Stevens
Sent: Thursday, August 18, 2016 5:08 PM
To: dev@cloudstack.apache.org
Subject: Re: Editable Documentation

can you link to the documentation you are referencing?

*Will STEVENS*
Lead Developer

*CloudOps* *| *Cloud Solutions Experts
420 rue Guy *|* Montreal *|* Quebec *|* H3J 1S6 w cloudops.com *|* tw @CloudOps_

On Thu, Aug 18, 2016 at 4:53 PM, Marty Godsey  wrote:

> Is there an editable form of the documentation? Like a Word Doc or 
> something? I know I can download the HTML and go through it but was 
> wondering if there was a less "tedious" way.
>
> Regards,
> Marty Godsey
>
>


Re: Editable Documentation

2016-08-18 Thread Will Stevens
Marty, here are the docs:
https://github.com/apache?utf8=%E2%9C%93=cloudstack

As you can see there are quite a few different locations.  If you send me a
link to the docs you are referring to, I can point you towards which repo
it is built from.

The docs are built as static websites from the formatted text files in
these repos.

Just ask if you have problems building the docs.

Cheers,

*Will STEVENS*
Lead Developer

*CloudOps* *| *Cloud Solutions Experts
420 rue Guy *|* Montreal *|* Quebec *|* H3J 1S6
w cloudops.com *|* tw @CloudOps_

On Thu, Aug 18, 2016 at 5:16 PM, Simon Weller  wrote:

> Marty,
>
>
> I think Will is asking what ACS docs you are wanting in an editable format.
>
>
> - Si
>
>
> 
> From: Marty Godsey 
> Sent: Thursday, August 18, 2016 4:11 PM
> To: dev@cloudstack.apache.org
> Subject: RE: Editable Documentation
>
> Yes,,, however I would like to add branding.
>
> Regards,
> Marty Godsey
>
> -Original Message-
> From: williamstev...@gmail.com [mailto:williamstev...@gmail.com] On
> Behalf Of Will Stevens
> Sent: Thursday, August 18, 2016 5:08 PM
> To: dev@cloudstack.apache.org
> Subject: Re: Editable Documentation
>
> can you link to the documentation you are referencing?
>
> *Will STEVENS*
> Lead Developer
>
> *CloudOps* *| *Cloud Solutions Experts
> 420 rue Guy *|* Montreal *|* Quebec *|* H3J 1S6 w cloudops.com *|* tw
> @CloudOps_
>
> On Thu, Aug 18, 2016 at 4:53 PM, Marty Godsey  wrote:
>
> > Is there an editable form of the documentation? Like a Word Doc or
> > something? I know I can download the HTML and go through it but was
> > wondering if there was a less "tedious" way.
> >
> > Regards,
> > Marty Godsey
> >
> >
>


Re: Editable Documentation

2016-08-18 Thread Simon Weller
Marty,


I think Will is asking what ACS docs you are wanting in an editable format.


- Si



From: Marty Godsey 
Sent: Thursday, August 18, 2016 4:11 PM
To: dev@cloudstack.apache.org
Subject: RE: Editable Documentation

Yes,,, however I would like to add branding.

Regards,
Marty Godsey

-Original Message-
From: williamstev...@gmail.com [mailto:williamstev...@gmail.com] On Behalf Of 
Will Stevens
Sent: Thursday, August 18, 2016 5:08 PM
To: dev@cloudstack.apache.org
Subject: Re: Editable Documentation

can you link to the documentation you are referencing?

*Will STEVENS*
Lead Developer

*CloudOps* *| *Cloud Solutions Experts
420 rue Guy *|* Montreal *|* Quebec *|* H3J 1S6 w cloudops.com *|* tw @CloudOps_

On Thu, Aug 18, 2016 at 4:53 PM, Marty Godsey  wrote:

> Is there an editable form of the documentation? Like a Word Doc or
> something? I know I can download the HTML and go through it but was
> wondering if there was a less "tedious" way.
>
> Regards,
> Marty Godsey
>
>


RE: Editable Documentation

2016-08-18 Thread Marty Godsey
Yes,,, however I would like to add branding.

Regards,
Marty Godsey

-Original Message-
From: williamstev...@gmail.com [mailto:williamstev...@gmail.com] On Behalf Of 
Will Stevens
Sent: Thursday, August 18, 2016 5:08 PM
To: dev@cloudstack.apache.org
Subject: Re: Editable Documentation

can you link to the documentation you are referencing?

*Will STEVENS*
Lead Developer

*CloudOps* *| *Cloud Solutions Experts
420 rue Guy *|* Montreal *|* Quebec *|* H3J 1S6 w cloudops.com *|* tw @CloudOps_

On Thu, Aug 18, 2016 at 4:53 PM, Marty Godsey  wrote:

> Is there an editable form of the documentation? Like a Word Doc or 
> something? I know I can download the HTML and go through it but was 
> wondering if there was a less "tedious" way.
>
> Regards,
> Marty Godsey
>
>


Re: Editable Documentation

2016-08-18 Thread Will Stevens
can you link to the documentation you are referencing?

*Will STEVENS*
Lead Developer

*CloudOps* *| *Cloud Solutions Experts
420 rue Guy *|* Montreal *|* Quebec *|* H3J 1S6
w cloudops.com *|* tw @CloudOps_

On Thu, Aug 18, 2016 at 4:53 PM, Marty Godsey  wrote:

> Is there an editable form of the documentation? Like a Word Doc or
> something? I know I can download the HTML and go through it but was
> wondering if there was a less "tedious" way.
>
> Regards,
> Marty Godsey
>
>


Editable Documentation

2016-08-18 Thread Marty Godsey
Is there an editable form of the documentation? Like a Word Doc or something? I 
know I can download the HTML and go through it but was wondering if there was a 
less "tedious" way.

Regards,
Marty Godsey



[GitHub] cloudstack issue #1642: System VMs on Managed Storage

2016-08-18 Thread mike-tutkowski
Github user mike-tutkowski commented on the issue:

https://github.com/apache/cloudstack/pull/1642
  
Thank you both for providing your reviews and subsequent LGTMs. :)

I believe this PR is ready to be merged.

Who is responsible for doing that these days? Can I or do we specifically 
have the release manager(s) do this again? Thanks!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack issue #1605: CLOUDSTACK-9428: Fix for CLOUDSTACK-9211 - Improve p...

2016-08-18 Thread nvazquez
Github user nvazquez commented on the issue:

https://github.com/apache/cloudstack/pull/1605
  
Thanks @sateesh-chodapuneedi! 
You've mentioned before that you will test this in your env, can you please 
share your tests results?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack issue #1605: CLOUDSTACK-9428: Fix for CLOUDSTACK-9211 - Improve p...

2016-08-18 Thread sateesh-chodapuneedi
Github user sateesh-chodapuneedi commented on the issue:

https://github.com/apache/cloudstack/pull/1605
  
LGTM 👍 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack issue #1541: Systemd packaging for Ubuntu 16.04

2016-08-18 Thread wido
Github user wido commented on the issue:

https://github.com/apache/cloudstack/pull/1541
  
@rhtyd That's a total merge hell with all the version number conflicts in 
the pom.xml files.

This PR has been open since May this year, far before 4.9 was even cut.

Can't we merge it into master and cherry-pick back to 4.9?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack issue #1599: Marvin: Fix codegenerator to work with API discovery

2016-08-18 Thread jburwell
Github user jburwell commented on the issue:

https://github.com/apache/cloudstack/pull/1599
  
@rhtyd that explanation makes sense, and the code seems to address that 
issue.  Could you please amend the explanation to the commit message?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


Jira permissions

2016-08-18 Thread Nathan Johnson
Is there any way I could be added to the list of people who can be assigned  
bugs in Jira?  My username is nathanejohnson .

Thanks in advance,
Nathan


[GitHub] cloudstack issue #1645: On snapshot backup, this converts the rbd raw format...

2016-08-18 Thread kiwiflyer
Github user kiwiflyer commented on the issue:

https://github.com/apache/cloudstack/pull/1645
  
CLOUDSTACK-9461


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


Re: cloudstack-usage no longer working / error saving account to cloud_usage db

2016-08-18 Thread Rohit Yadav
Hi Stephan,


Glad it resolved your issue. When you upgrade CloudStack always make sure to 
shutdown all usage servers, as sometimes if the usage server tries to add 
data/entries to cloud_usage db while the upgraded mgmt server is trying to 
change the schema (of any tables in cloud_usage db) you might end up with bad 
data or entries.


I'm not sure what happened in your environment, but I can speculate a case 
where usage server tries to add an account but the role_id column might not 
have added (alter statement did not run for some reason) this would cause NPEs 
as the column does not exist in the cloud.account table yet. Nevertheless, I'm 
glad it's not an issue with the code/release itself.


Cheers.


From: Stephan Seitz 
Sent: 18 August 2016 18:06:49
To: dev@cloudstack.apache.org; us...@cloudstack.apache.org
Subject: Re: cloudstack-usage no longer working / error saving account to 
cloud_usage db

Hi Rohit,

thanks!

Having a recent DB backup at hand and only based on guesses, I did some
further experiments yesterday :)
- Rerun /usr/share/cloudstack-common/scripts/util/migrate-
dynamicroles.py
- Checked cloudstack-usage 4.8.0.1 instead of 4.9
- Updated back to cloudstack-usage 4.9
... and magically, it works after I changed the pid of the latest
cloud_usage.usage_job to the corresponding pid.

Though, I don't think thats the recommended way for a fix as I don't
know why it's working...

cloud.account shows role_id for every active account.
cloud_usage.account now shows role_id for these accounts also.
Only PrjAcct-$projectname-$id has role_id set to NULL, but I assume
this is correct since Projects are not assigned to roles.

Anyway, the metric/quota reports are working!

- Stephan

Am Donnerstag, den 18.08.2016, 09:03 + schrieb Rohit Yadav:
> Hi Stephan,
>
>
> In cloud_usage.account `role_id` can be NULL as there is no user of
> this field within the usage server. In cloud.account, the `role_id`
> should be automatically populated/migrated when you upgraded. From
> your shared db query result, I'm not sure if that's a select query on
> cloud.account or cloud_usage.account, can you confirm it?
>
>
> Based on the exception, we can only get that if the account being
> saved don't have any role_id defined. With a new account created and
> usage records generated, I could not reproduce your issue. It is
> likely caused by an account in cloud.account table whose role_id is
> NULL.
>
>
> Can you check (and share) that all of your accounts in cloud database
> (cloud.account) have non-NULL role_id? Please fix anything that is
> NULL. For root admin account type use set role_id=1, for resource
> admin set role_id=2, for domain admin set role_id=3 and for user
> account set role_type=4;
>
>
> Regards.
>
> rohit.ya...@shapeblue.com
> www.shapeblue.com
> 53 Chandos Place, Covent Garden, London  WC2N 4HSUK
> @shapeblue
>
>
>

rohit.ya...@shapeblue.com 
www.shapeblue.com
53 Chandos Place, Covent Garden, London  WC2N 4HSUK
@shapeblue
  
 



[GitHub] cloudstack issue #1645: On snapshot backup, this converts the rbd raw format...

2016-08-18 Thread kiwiflyer
Github user kiwiflyer commented on the issue:

https://github.com/apache/cloudstack/pull/1645
  
@wido  This is also nice for users of Ceph.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack issue #1644: Honors the snapshot.backup.rightafter configuration ...

2016-08-18 Thread kiwiflyer
Github user kiwiflyer commented on the issue:

https://github.com/apache/cloudstack/pull/1644
  
@wido Nice feature for Ceph users.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack issue #1644: Honors the snapshot.backup.rightafter configuration ...

2016-08-18 Thread kiwiflyer
Github user kiwiflyer commented on the issue:

https://github.com/apache/cloudstack/pull/1644
  
LGTM, tested in our lab.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack issue #1645: On snapshot backup, this converts the rbd raw format...

2016-08-18 Thread kiwiflyer
Github user kiwiflyer commented on the issue:

https://github.com/apache/cloudstack/pull/1645
  
LGTM, tested in our lab.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack issue #1646: [4.9/LTS] Add upgrade path from 4.9.0 to 4.9.1

2016-08-18 Thread rhtyd
Github user rhtyd commented on the issue:

https://github.com/apache/cloudstack/pull/1646
  
@jburwell this makes sense, I'll update the PR and also fix this on master. 
Regarding 4.8 branch, I'm not sure so I'll ask @swill -- Will can you run 
setnextversion.sh on 4.8 branch to say 4.8.3.0-SNAPSHOT ?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request #1599: Marvin: Fix codegenerator to work with API di...

2016-08-18 Thread rhtyd
Github user rhtyd closed the pull request at:

https://github.com/apache/cloudstack/pull/1599


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request #1599: Marvin: Fix codegenerator to work with API di...

2016-08-18 Thread rhtyd
GitHub user rhtyd reopened a pull request:

https://github.com/apache/cloudstack/pull/1599

Marvin: Fix codegenerator to work with API discovery

This fixes Marvin cloudstackAPI generator to work with a live running mgmt 
server's api discovery.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/shapeblue/cloudstack independent-marvin

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/cloudstack/pull/1599.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1599


commit b2ce02dbf8ca6ffe5220bea933d6e34f4612e6f9
Author: Rohit Yadav 
Date:   2016-06-28T10:23:20Z

marvin: fix codegeneration against API discovery endpoint

This makes the commands.xml based codegeneration equivalent to the
API discovery end point based discovery.

Signed-off-by: Rohit Yadav 




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack issue #1599: Marvin: Fix codegenerator to work with API discovery

2016-08-18 Thread rhtyd
Github user rhtyd commented on the issue:

https://github.com/apache/cloudstack/pull/1599
  
@jburwell the Travis build failed due to tearDown error in one of the tests:
=== TestName: test_listVM_by_id_as_user_vmsfromotherdomain | Status : 
EXCEPTION ===

I'll re-kick it. The PR does not change any part of CloudStack, nor are the 
changes in the normal codegenerator used to generate `cloudstackAPI` in the 
marvin library.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack issue #1599: Marvin: Fix codegenerator to work with API discovery

2016-08-18 Thread rhtyd
Github user rhtyd commented on the issue:

https://github.com/apache/cloudstack/pull/1599
  
@jburwell yes, this PR does not implement API-discovery based generation 
but rather fixes the fields that the (api discovery based)  codegenerator 
should produce in the generated python classes (cmd and response classes per 
api/module). The issue was the autogenerated `cloudstackAPI` differed between 
api-based and apidocs-based code generation. With this PR the generated classes 
match exactly thereby allowing us to go with either methods to generate 
`cloudstackAPI`.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack issue #1646: [4.9/LTS] Add upgrade path from 4.9.0 to 4.9.1

2016-08-18 Thread jburwell
Github user jburwell commented on the issue:

https://github.com/apache/cloudstack/pull/1646
  
@rhtyd we are moving to four position to version numbers to support our 
recent security release change where the fourth position is used to reflect 
security patch.  Therefore, the (release 
schedule)[https://cwiki.apache.org/confluence/display/CLOUDSTACK/%5BPROPOSAL%5D+2016-2017+Release+Cycle+and+Calendar]
 designates the next release as 4.9.1.0.  Could you please update the POMs to 
reflect the fourth position?  We also need this change made for master 
(4.10.0.0) and 4.8 (4.8.2.0).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack issue #1599: Marvin: Fix codegenerator to work with API discovery

2016-08-18 Thread jburwell
Github user jburwell commented on the issue:

https://github.com/apache/cloudstack/pull/1599
  
@rhtyd Is my understanding correct that auto discovery was implemented in a 
previous commit and this PR fixes an defect in that work?  If so, could you 
please provide a detailed explanation of the issue fixed by this commit?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


Re: Issue with SSVM on KVM on master

2016-08-18 Thread Tutkowski, Mike
Based on the error message of not being able to find the 
PremiumSecondaryStorageResource class, this seems to be the following error (#9 
on this page: 
https://cwiki.apache.org/confluence/display/CLOUDSTACK/SSVM,+templates,+Secondary+storage+troubleshooting):

SSVM agent not running - You see error something like below. Most probably your 
systemvm didnt get patched with the agent specific code. This patching happens 
through the ISO - something like  systemvm***.iso. Check the size and location 
of the iso and whether you are not using the old version iso. For XS its on the 
host so grep for it and for vmware its on secondary storage. Do also check that 
if its vmware that you built your ssvm using noredist flag for mvn command. For 
more information check SystemVm.iso
2013-12-20 13:35:12,954 DEBUG [cloud.utils.ProcessUtil] (main:null) Execution 
is successful.
2013-12-20 13:35:12,960 ERROR [cloud.agent.AgentShell] (main:null) Unable to 
start agent: Resource class not found: 
com.cloud.storage.resource.PremiumSecondaryStorageResource due to: 
java.lang.ClassNotFoundException: 
com.cloud.storage.resource.PremiumSecondaryStorageResource

I do see the ISO, though, on secondary storage here:

cloudstack@cloudstack-virtual-machine:/export/secondary/systemvm$ ls -l
total 83420
-rw-rw-r-- 1 cloudstack cloudstack 85420032 Aug 15 16:10 
systemvm-4.10.0-SNAPSHOT.iso

From: Tutkowski, Mike 
Sent: Thursday, August 18, 2016 8:17 AM
To: dev@cloudstack.apache.org
Subject: Re: Issue with SSVM on KVM on master

In /var/log/cloud/cloud.out, I see the following repeated over and over again 
(below).

I'm running version 4.10.0 of the management server (but the implementation 
version of the agent looks to be 4.9.0). I do have systemvm-4.10.0-SNAPSHOT.iso 
accessible at /export/secondary/systemvm (/export/secondary is my one and only 
secondary storage at the time being).

2016-08-18 14:03:43,633 INFO  [cloud.agent.AgentShell] (main:null) Agent started
2016-08-18 14:03:43,637 INFO  [cloud.agent.AgentShell] (main:null) 
Implementation Version is 4.9.0
2016-08-18 14:03:43,637 INFO  [cloud.agent.AgentShell] (main:null) 
agent.properties found at /usr/local/cloud/systemvm/conf/agent.properties
2016-08-18 14:03:43,643 DEBUG [cloud.agent.AgentShell] (main:null) Found 
property: instance
2016-08-18 14:03:43,643 DEBUG [cloud.agent.AgentShell] (main:null) Found 
property: resource
2016-08-18 14:03:43,643 INFO  [cloud.agent.AgentShell] (main:null) Defaulting 
to using properties file for storage
2016-08-18 14:03:43,645 INFO  [cloud.agent.AgentShell] (main:null) Defaulting 
to the constant time backoff algorithm
2016-08-18 14:03:43,666 INFO  [cloud.utils.LogUtils] (main:null) log4j 
configuration found at /usr/local/cloud/systemvm/conf/log4j-cloud.xml
2016-08-18 14:03:43,686 INFO  [cloud.agent.AgentShell] (main:null) Using 
default Java settings for IPv6 preference for agent connection
2016-08-18 14:03:43,687 DEBUG [cloud.agent.AgentShell] (main:null) Checking to 
see if agent.SecStorage.pid exists.
2016-08-18 14:03:43,694 DEBUG [cloud.utils.ProcessUtil] (main:null) 
environment.properties could not be opened
2016-08-18 14:03:43,703 DEBUG [cloud.utils.ProcessUtil] (main:null) Executing: 
bash -c echo $PPID
2016-08-18 14:03:43,711 DEBUG [cloud.utils.ProcessUtil] (main:null) Execution 
is successful.
2016-08-18 14:03:43,726 ERROR [cloud.agent.AgentShell] (main:null) Unable to 
start agent: Resource class not found: 
com.cloud.storage.resource.PremiumSecondaryStorageResource due to: 
java.lang.ClassNotFoundException: 
com.cloud.storage.resource.PremiumSecondaryStorageResource



From: Tutkowski, Mike 
Sent: Thursday, August 18, 2016 7:54 AM
To: dev@cloudstack.apache.org
Subject: Re: Issue with SSVM on KVM on master

Thanks for the comments, Simon.

I went ahead and tried to telnet into 8250 on my management server (first from 
the SSVM and then from another machine). In both cases, this was the result:

telnet 192.168.129.50 8250
Trying 192.168.129.50...
Connected to 192.168.129.50.
Escape character is '^]'.
Connection closed by foreign host.

It looks like a connection was established, but then shortly after closed. Is 
this what you were expecting might happen?

From: Simon Weller 
Sent: Thursday, August 18, 2016 6:39 AM
To: dev@cloudstack.apache.org
Subject: Re: Issue with SSVM on KVM on master

Mike,


I wonder whether this could be related to the NIO connection improvements. We 
saw this type of problem quite a bit when we were testing it (with all types of 
agents). Typically you'll see the agent logs indicating they can't connect to 
the management server if this is the case.  Try telnetting to 8250 on your mgmt 
server and see if suddenly your agent starts to work.


- Si



From: Tutkowski, Mike 

Re: Issue with SSVM on KVM on master

2016-08-18 Thread Tutkowski, Mike
In /var/log/cloud/cloud.out, I see the following repeated over and over again 
(below).

I'm running version 4.10.0 of the management server (but the implementation 
version of the agent looks to be 4.9.0). I do have systemvm-4.10.0-SNAPSHOT.iso 
accessible at /export/secondary/systemvm (/export/secondary is my one and only 
secondary storage at the time being).

2016-08-18 14:03:43,633 INFO  [cloud.agent.AgentShell] (main:null) Agent started
2016-08-18 14:03:43,637 INFO  [cloud.agent.AgentShell] (main:null) 
Implementation Version is 4.9.0
2016-08-18 14:03:43,637 INFO  [cloud.agent.AgentShell] (main:null) 
agent.properties found at /usr/local/cloud/systemvm/conf/agent.properties
2016-08-18 14:03:43,643 DEBUG [cloud.agent.AgentShell] (main:null) Found 
property: instance
2016-08-18 14:03:43,643 DEBUG [cloud.agent.AgentShell] (main:null) Found 
property: resource
2016-08-18 14:03:43,643 INFO  [cloud.agent.AgentShell] (main:null) Defaulting 
to using properties file for storage
2016-08-18 14:03:43,645 INFO  [cloud.agent.AgentShell] (main:null) Defaulting 
to the constant time backoff algorithm
2016-08-18 14:03:43,666 INFO  [cloud.utils.LogUtils] (main:null) log4j 
configuration found at /usr/local/cloud/systemvm/conf/log4j-cloud.xml
2016-08-18 14:03:43,686 INFO  [cloud.agent.AgentShell] (main:null) Using 
default Java settings for IPv6 preference for agent connection
2016-08-18 14:03:43,687 DEBUG [cloud.agent.AgentShell] (main:null) Checking to 
see if agent.SecStorage.pid exists.
2016-08-18 14:03:43,694 DEBUG [cloud.utils.ProcessUtil] (main:null) 
environment.properties could not be opened
2016-08-18 14:03:43,703 DEBUG [cloud.utils.ProcessUtil] (main:null) Executing: 
bash -c echo $PPID 
2016-08-18 14:03:43,711 DEBUG [cloud.utils.ProcessUtil] (main:null) Execution 
is successful.
2016-08-18 14:03:43,726 ERROR [cloud.agent.AgentShell] (main:null) Unable to 
start agent: Resource class not found: 
com.cloud.storage.resource.PremiumSecondaryStorageResource due to: 
java.lang.ClassNotFoundException: 
com.cloud.storage.resource.PremiumSecondaryStorageResource



From: Tutkowski, Mike 
Sent: Thursday, August 18, 2016 7:54 AM
To: dev@cloudstack.apache.org
Subject: Re: Issue with SSVM on KVM on master

Thanks for the comments, Simon.

I went ahead and tried to telnet into 8250 on my management server (first from 
the SSVM and then from another machine). In both cases, this was the result:

telnet 192.168.129.50 8250
Trying 192.168.129.50...
Connected to 192.168.129.50.
Escape character is '^]'.
Connection closed by foreign host.

It looks like a connection was established, but then shortly after closed. Is 
this what you were expecting might happen?

From: Simon Weller 
Sent: Thursday, August 18, 2016 6:39 AM
To: dev@cloudstack.apache.org
Subject: Re: Issue with SSVM on KVM on master

Mike,


I wonder whether this could be related to the NIO connection improvements. We 
saw this type of problem quite a bit when we were testing it (with all types of 
agents). Typically you'll see the agent logs indicating they can't connect to 
the management server if this is the case.  Try telnetting to 8250 on your mgmt 
server and see if suddenly your agent starts to work.


- Si



From: Tutkowski, Mike 
Sent: Wednesday, August 17, 2016 6:04 PM
To: dev@cloudstack.apache.org
Subject: Re: Issue with SSVM on KVM on master

I should have pointed out that this is a Basic Zone. Also, there is only one 
KVM host in my one cluster.

From: Tutkowski, Mike 
Sent: Wednesday, August 17, 2016 5:03 PM
To: dev@cloudstack.apache.org
Subject: Issue with SSVM on KVM on master

Hi,


I am trying to build a cloud making use of KVM system VMs.


My SSVM VM comes up, but its agent doesn't seem to:


http://imgur.com/a/Fo2ax
[http://i.imgur.com/xdP9alM.jpg?fb]

Imgur: The most awesome images on the Internet
imgur.com
Imgur: The most awesome images on the Internet.





Thoughts on what might be going on here?


Thanks!

Mike


Re: Issue with SSVM on KVM on master

2016-08-18 Thread Tutkowski, Mike
Thanks for the comments, Simon.

I went ahead and tried to telnet into 8250 on my management server (first from 
the SSVM and then from another machine). In both cases, this was the result:

telnet 192.168.129.50 8250
Trying 192.168.129.50...
Connected to 192.168.129.50.
Escape character is '^]'.
Connection closed by foreign host.

It looks like a connection was established, but then shortly after closed. Is 
this what you were expecting might happen?

From: Simon Weller 
Sent: Thursday, August 18, 2016 6:39 AM
To: dev@cloudstack.apache.org
Subject: Re: Issue with SSVM on KVM on master

Mike,


I wonder whether this could be related to the NIO connection improvements. We 
saw this type of problem quite a bit when we were testing it (with all types of 
agents). Typically you'll see the agent logs indicating they can't connect to 
the management server if this is the case.  Try telnetting to 8250 on your mgmt 
server and see if suddenly your agent starts to work.


- Si



From: Tutkowski, Mike 
Sent: Wednesday, August 17, 2016 6:04 PM
To: dev@cloudstack.apache.org
Subject: Re: Issue with SSVM on KVM on master

I should have pointed out that this is a Basic Zone. Also, there is only one 
KVM host in my one cluster.

From: Tutkowski, Mike 
Sent: Wednesday, August 17, 2016 5:03 PM
To: dev@cloudstack.apache.org
Subject: Issue with SSVM on KVM on master

Hi,


I am trying to build a cloud making use of KVM system VMs.


My SSVM VM comes up, but its agent doesn't seem to:


http://imgur.com/a/Fo2ax
[http://i.imgur.com/xdP9alM.jpg?fb]

Imgur: The most awesome images on the Internet
imgur.com
Imgur: The most awesome images on the Internet.





Thoughts on what might be going on here?


Thanks!

Mike


[GitHub] cloudstack issue #1599: Marvin: Fix codegenerator to work with API discovery

2016-08-18 Thread pdion891
Github user pdion891 commented on the issue:

https://github.com/apache/cloudstack/pull/1599
  
The code seams to make sense.  I like the idea of api auto-discovery so 
it's a LGTM I guest.
I'm a bit out of context on this one but if it's usefull lets merge it.

Cheers,


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


Re: Issue with SSVM on KVM on master

2016-08-18 Thread Simon Weller
Mike,


I wonder whether this could be related to the NIO connection improvements. We 
saw this type of problem quite a bit when we were testing it (with all types of 
agents). Typically you'll see the agent logs indicating they can't connect to 
the management server if this is the case.  Try telnetting to 8250 on your mgmt 
server and see if suddenly your agent starts to work.


- Si



From: Tutkowski, Mike 
Sent: Wednesday, August 17, 2016 6:04 PM
To: dev@cloudstack.apache.org
Subject: Re: Issue with SSVM on KVM on master

I should have pointed out that this is a Basic Zone. Also, there is only one 
KVM host in my one cluster.

From: Tutkowski, Mike 
Sent: Wednesday, August 17, 2016 5:03 PM
To: dev@cloudstack.apache.org
Subject: Issue with SSVM on KVM on master

Hi,


I am trying to build a cloud making use of KVM system VMs.


My SSVM VM comes up, but its agent doesn't seem to:


http://imgur.com/a/Fo2ax
[http://i.imgur.com/xdP9alM.jpg?fb]

Imgur: The most awesome images on the Internet
imgur.com
Imgur: The most awesome images on the Internet.





Thoughts on what might be going on here?


Thanks!

Mike


Re: cloudstack-usage no longer working / error saving account to cloud_usage db

2016-08-18 Thread Stephan Seitz
Hi Rohit,

thanks!

Having a recent DB backup at hand and only based on guesses, I did some
further experiments yesterday :)
- Rerun /usr/share/cloudstack-common/scripts/util/migrate-
dynamicroles.py
- Checked cloudstack-usage 4.8.0.1 instead of 4.9
- Updated back to cloudstack-usage 4.9
... and magically, it works after I changed the pid of the latest
cloud_usage.usage_job to the corresponding pid.

Though, I don't think thats the recommended way for a fix as I don't
know why it's working...

cloud.account shows role_id for every active account.
cloud_usage.account now shows role_id for these accounts also.
Only PrjAcct-$projectname-$id has role_id set to NULL, but I assume
this is correct since Projects are not assigned to roles.

Anyway, the metric/quota reports are working!

- Stephan

Am Donnerstag, den 18.08.2016, 09:03 + schrieb Rohit Yadav:
> Hi Stephan,
> 
> 
> In cloud_usage.account `role_id` can be NULL as there is no user of
> this field within the usage server. In cloud.account, the `role_id`
> should be automatically populated/migrated when you upgraded. From
> your shared db query result, I'm not sure if that's a select query on
> cloud.account or cloud_usage.account, can you confirm it?
> 
> 
> Based on the exception, we can only get that if the account being
> saved don't have any role_id defined. With a new account created and
> usage records generated, I could not reproduce your issue. It is
> likely caused by an account in cloud.account table whose role_id is
> NULL.
> 
> 
> Can you check (and share) that all of your accounts in cloud database
> (cloud.account) have non-NULL role_id? Please fix anything that is
> NULL. For root admin account type use set role_id=1, for resource
> admin set role_id=2, for domain admin set role_id=3 and for user
> account set role_type=4;
> 
> 
> Regards.
> 
> rohit.ya...@shapeblue.com 
> www.shapeblue.com
> 53 Chandos Place, Covent Garden, London  WC2N 4HSUK
> @shapeblue
>   
>  
> 


RE: Hiding buttons based on role

2016-08-18 Thread Rashmi Dixit
Hi Marty,

We could add an "actionPreFilter" for "actions" defined in the widgets which 
will filter out the buttons based on role.

There are preFilters already implemented for fields in a listView - we need to 
follow the same principle. We need to check for this filter where the buttons 
are built in the listView (look for "if (listViewData.actions) {" in 
listView.js).

Hope this helps! 
Rashmi



-Original Message-
From: Marty Godsey [mailto:ma...@gonsource.com] 
Sent: Thursday, August 18, 2016 6:04 AM
To: dev@cloudstack.apache.org
Subject: RE: Hiding buttons based on role

Not elegant but will work. This is not a one off to a degree. It's for my own 
servers but I will have at least 10-20 management server across the country in 
different zones  but this allows me to "hide" some elements that won't be used 
until a more elegant way is created/available.

Thank you for the direction Will.

Regards,
Marty Godsey

-Original Message-
From: Will Stevens [mailto:williamstev...@gmail.com]
Sent: Wednesday, August 17, 2016 8:29 PM
To: dev@cloudstack.apache.org
Subject: RE: Hiding buttons based on role

If I was doing a one off solution for my own use case with a limited scope, I 
would do it he following.

Apply a CSS class to the  tag which corresponds to the role. Then I would 
use CSS to 'display:none' on the elements you want to turn off by referencing 
the body role class (and keep the permissions applied so if they unhide it 
won't work).

It is not an elegant solution, but it will work.

On Aug 17, 2016 8:19 PM, "Marty Godsey"  wrote:

>

> Ok. Thank you.
>
> I think for the time being I will enable all the project APIs again 
> but
deny access to create a project.. this way at least he API errors on page load 
go away.
>
> This is something I think would be nice to have in the permissions 
> area
now since we have granular rules. A way to "turn off" certain areas of the GUI 
and/or ACS functionality.
>
> Regards,
> Marty Godsey
>
> -Original Message-
> From: Will Stevens [mailto:williamstev...@gmail.com]
> Sent: Wednesday, August 17, 2016 8:10 PM
> To: dev@cloudstack.apache.org
> Subject: RE: Hiding buttons based on role
>
> Yes. Most of the UI is built using huge json structures. These will 
> need
to be adapted to account for a user's role. I don't think there has been work 
done on that yet, but I could be wrong.
>
> @rohit, do you know if anyone has looked into this at all yet?
>
> On Aug 17, 2016 7:41 PM, "Marty Godsey"  wrote:
>
> > With that being said, we are now getting into the area of UI 
> > modification to hide the button huh?
> >
> > Regards,
> > Marty Godsey
> >
> > -Original Message-
> > From: Will Stevens [mailto:williamstev...@gmail.com]
> > Sent: Wednesday, August 17, 2016 7:23 PM
> > To: dev@cloudstack.apache.org
> > Subject: Re: Hiding buttons based on role
> >
> > My understanding is that the permissions can be set, but they 
> > currently do not modify the UI in any way. I believe what you are 
> > experiencing is the expected behavior.
> >
> > Cheers,
> >
> > Will
> >
> > On Aug 17, 2016 6:47 PM, "Marty Godsey"  wrote:
> >
> > > Is it possible to hide a button based upon a role? As an example I 
> > > want to hide and deny access to the projects tab. I can modify the 
> > > role access to the API but the button is still present. In fact I 
> > > get an API error that states I don't have access.
> > >
> > > Regards,
> > > Marty Godsey
> > >
> > >
> >



DISCLAIMER
==
This e-mail may contain privileged and confidential information which is the 
property of Accelerite, a Persistent Systems business. It is intended only for 
the use of the individual or entity to which it is addressed. If you are not 
the intended recipient, you are not authorized to read, retain, copy, print, 
distribute or use this message. If you have received this communication in 
error, please notify the sender and delete all copies of this message. 
Accelerite, a Persistent Systems business does not accept any liability for 
virus infected mails.


[GitHub] cloudstack issue #1646: [4.9/LTS] Add upgrade path from 4.9.0 to 4.9.1

2016-08-18 Thread blueorangutan
Github user blueorangutan commented on the issue:

https://github.com/apache/cloudstack/pull/1646
  
Packaging result: ✔centos6 ✔centos7 ✔debian repo: 
http://packages.shapeblue.com/cloudstack/pr/1646
Job ID-90


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack issue #1541: Systemd packaging for Ubuntu 16.04

2016-08-18 Thread rhtyd
Github user rhtyd commented on the issue:

https://github.com/apache/cloudstack/pull/1541
  
@wido can you reopen or edit the PR for base branch 4.9? Let's get this 
merged, as we'll need to support Ubuntu 16.04 for our LTS release.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack issue #1511: 4.9/master bountycastle changes

2016-08-18 Thread rhtyd
Github user rhtyd commented on the issue:

https://github.com/apache/cloudstack/pull/1511
  
rebased against latest master


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack issue #1599: Marvin: Fix codegenerator to work with API discovery

2016-08-18 Thread rhtyd
Github user rhtyd commented on the issue:

https://github.com/apache/cloudstack/pull/1599
  
Pinging for review -- @karuturi @jburwell @koushik-das @swill @pdion891 and 
others. Thanks.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack issue #1646: [4.9/LTS] Add upgrade path from 4.9.0 to 4.9.1

2016-08-18 Thread blueorangutan
Github user blueorangutan commented on the issue:

https://github.com/apache/cloudstack/pull/1646
  
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you 
posted as I make progress.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request #1646: [4.9/LTS] Add upgrade path from 4.9.0 to 4.9....

2016-08-18 Thread rhtyd
GitHub user rhtyd opened a pull request:

https://github.com/apache/cloudstack/pull/1646

[4.9/LTS] Add upgrade path from 4.9.0 to 4.9.1

This adds db upgrade path from 4.9.0 to 4.9.1 and fixes a typo in default 
user role description (CLOUDSTACK-9449)

/cc @karuturi @jburwell  -- this will cause issues when fwd-merged to 
master, I can do the fwd-merging if you would like to avoid fixing the 
conflicts yourself

@blueorangutan package

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/shapeblue/cloudstack 4.9-491upgradepath

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/cloudstack/pull/1646.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1646


commit c2512b675463cb978995912978a3e687e1bb8acb
Author: Rohit Yadav 
Date:   2016-08-18T09:40:09Z

cloudstack: upgrade path from 4.9.0 to 4.9.1

- Adds db upgrade path from 4.9.0 to 4.9.1
- CLOUDSTACK-9449: Fix typo in default user role description

Signed-off-by: Rohit Yadav 

commit 72aaf07fc6fc66fbb067afa569806e0a17649d9f
Author: Rohit Yadav 
Date:   2016-08-18T09:45:24Z

Updating pom.xml version numbers for release 4.9.1-SNAPSHOT

Signed-off-by: Rohit Yadav 




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request #1629: CLOUDSTACK-9449: Fix typo in user role descri...

2016-08-18 Thread rhtyd
Github user rhtyd closed the pull request at:

https://github.com/apache/cloudstack/pull/1629


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack issue #1634: [blocker] CLOUDSTACK-9452: add python-argparse depen...

2016-08-18 Thread rhtyd
Github user rhtyd commented on the issue:

https://github.com/apache/cloudstack/pull/1634
  
@karuturi @jburwell can we merge this, this is only packaging related fix. 
Using above packages, installation confirmed that argparse was installed on 
el6/el7 kvm hosts.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


Re: Hiding buttons based on role

2016-08-18 Thread Rohit Yadav
Hi Marty, Will,


I've heard about such a request before. Due to our legacy UI, there is no way 
to use api-discovery for a logged in user (based on their role etc.) to 
enable/disable UI elements such as buttons, views etc. Though a specific 
element may be hidden or displayed based on custom logic if the scope of it is 
rather small.


Regards.


From: Will Stevens 
Sent: 18 August 2016 06:19:24
To: dev@cloudstack.apache.org
Subject: RE: Hiding buttons based on role

Right. By one off, I mean, I don't expect the entire community to adopt
this approach.

The one thing to pay attention to with this approach is that every time you
change a roles permissions, you have to adapt and redeploy the CSS to
reflect the permission change. I don't remember if you have to rebuild to
pick up a new CSS file (I sure hope not).  You could put the css in an
object store (like s3) and reference it in ACS, then update the CORS
settings to 'allow origin X' and serve it from a central location. This way
if you have multiple installs of ACS that will have the same permissions
you can update the visibility on all in a single place.

How you want to manage it will depend on how you are configuring and
managing your ACS setups, but you the idea.

On Aug 17, 2016 8:34 PM, "Marty Godsey"  wrote:

> Not elegant but will work. This is not a one off to a degree. It's for my
> own servers but I will have at least 10-20 management server across the
> country in different zones  but this allows me to "hide" some elements that
> won't be used until a more elegant way is created/available.
>
> Thank you for the direction Will.
>
> Regards,
> Marty Godsey
>
> -Original Message-
> From: Will Stevens [mailto:williamstev...@gmail.com]
> Sent: Wednesday, August 17, 2016 8:29 PM
> To: dev@cloudstack.apache.org
> Subject: RE: Hiding buttons based on role
>
> If I was doing a one off solution for my own use case with a limited
> scope, I would do it he following.
>
> Apply a CSS class to the  tag which corresponds to the role. Then I
> would use CSS to 'display:none' on the elements you want to turn off by
> referencing the body role class (and keep the permissions applied so if
> they unhide it won't work).
>
> It is not an elegant solution, but it will work.
>
> On Aug 17, 2016 8:19 PM, "Marty Godsey"  wrote:
>
> >
>
> > Ok. Thank you.
> >
> > I think for the time being I will enable all the project APIs again
> > but
> deny access to create a project.. this way at least he API errors on page
> load go away.
> >
> > This is something I think would be nice to have in the permissions
> > area
> now since we have granular rules. A way to "turn off" certain areas of the
> GUI and/or ACS functionality.
> >
> > Regards,
> > Marty Godsey
> >
> > -Original Message-
> > From: Will Stevens [mailto:williamstev...@gmail.com]
> > Sent: Wednesday, August 17, 2016 8:10 PM
> > To: dev@cloudstack.apache.org
> > Subject: RE: Hiding buttons based on role
> >
> > Yes. Most of the UI is built using huge json structures. These will
> > need
> to be adapted to account for a user's role. I don't think there has been
> work done on that yet, but I could be wrong.
> >
> > @rohit, do you know if anyone has looked into this at all yet?
> >
> > On Aug 17, 2016 7:41 PM, "Marty Godsey"  wrote:
> >
> > > With that being said, we are now getting into the area of UI
> > > modification to hide the button huh?
> > >
> > > Regards,
> > > Marty Godsey
> > >
> > > -Original Message-
> > > From: Will Stevens [mailto:williamstev...@gmail.com]
> > > Sent: Wednesday, August 17, 2016 7:23 PM
> > > To: dev@cloudstack.apache.org
> > > Subject: Re: Hiding buttons based on role
> > >
> > > My understanding is that the permissions can be set, but they
> > > currently do not modify the UI in any way. I believe what you are
> > > experiencing is the expected behavior.
> > >
> > > Cheers,
> > >
> > > Will
> > >
> > > On Aug 17, 2016 6:47 PM, "Marty Godsey"  wrote:
> > >
> > > > Is it possible to hide a button based upon a role? As an example I
> > > > want to hide and deny access to the projects tab. I can modify the
> > > > role access to the API but the button is still present. In fact I
> > > > get an API error that states I don't have access.
> > > >
> > > > Regards,
> > > > Marty Godsey
> > > >
> > > >
> > >
>

rohit.ya...@shapeblue.com 
www.shapeblue.com
53 Chandos Place, Covent Garden, London  WC2N 4HSUK
@shapeblue
  
 



Re: cloudstack-usage no longer working / error saving account to cloud_usage db

2016-08-18 Thread Rohit Yadav
Hi Stephan,


In cloud_usage.account `role_id` can be NULL as there is no user of this field 
within the usage server. In cloud.account, the `role_id` should be 
automatically populated/migrated when you upgraded. From your shared db query 
result, I'm not sure if that's a select query on cloud.account or 
cloud_usage.account, can you confirm it?


Based on the exception, we can only get that if the account being saved don't 
have any role_id defined. With a new account created and usage records 
generated, I could not reproduce your issue. It is likely caused by an account 
in cloud.account table whose role_id is NULL.


Can you check (and share) that all of your accounts in cloud database 
(cloud.account) have non-NULL role_id? Please fix anything that is NULL. For 
root admin account type use set role_id=1, for resource admin set role_id=2, 
for domain admin set role_id=3 and for user account set role_type=4;


Regards.

rohit.ya...@shapeblue.com 
www.shapeblue.com
53 Chandos Place, Covent Garden, London  WC2N 4HSUK
@shapeblue
  
 



[GitHub] cloudstack issue #1640: CLOUDSTACK-9458: Fix HA bug when VMs are stopped on ...

2016-08-18 Thread marcaurele
Github user marcaurele commented on the issue:

https://github.com/apache/cloudstack/pull/1640
  
I understand your point of the release, but we're not in an ideal world 
where everyone runs the latest version. I try to do my best to look at the 
current code in CS to find possible fixes of any bug/problem we encounter or 
changes we want to do in our version. I want us to get back to the master 
version but that's not the topic here, neither going to happen in the next 
weeks.

The point 2 does not make sense to me. If the management server cannot 
determine the state of the VM, it could mark them as stopped (*even though I 
don't think it should*). But it should not create a StopVM job, because that 
might trigger a proper stop of the VM if the agent is reconnecting while the 
job is picked by async job workers.
If the VM is really down because the host has crashed, then the command is 
pointless, and in a customer point of view it would not make a difference. If 
the host is still up and fine, but we have a network glitch, then requesting a 
stop of the VM is really bad in a customer point of view. By not doing 
anything, not requesting a stop, we would end up in a better situation.

Going back to which state should be set on the VM when the management 
server cannot determine it, taking the assumption that the VM is stopped 
because the management server cannot reach the agent is as much incorrect as 
leaving it as it is (running, migrating, creating...). I'd rather create a new 
state `UNKNOWN` for such special case, when the management server does really 
not know. In a management point of view it will be also easier to know there 
are *ghost* VMs somewhere for which the management server cannot determine the 
exact state and proper investigation (*manual*) should be done if the state 
stays like this, regarding the billing part too.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


Re: AJAX video stream for VM console is broken in Chrome

2016-08-18 Thread Rohit Yadav
Hi Sergey,


Can you open console in Chrome and then click on Tools-> Developer Tools. It 
would open a separate window from where you can debug what's going wrong. In 
the developer tools window, head over to the console tab and share if you're 
seeing any errors. Head over to the network tab, where you can ajax? and 
ajaximg? url requests being made, if you're not seeing any such URL 
requests/activities perhaps there was an issue with loading resources from the 
embedded iframe. To debug this, head over to the 'Elements' tab, click on 
iframset and copy the iframe src url. Try to open this URL in Chrome in a 
separate tab. It might fail to load due to SSL/TLS certificate error or any 
other network configuration.


Can you also share your OS details, Chrome version and CloudStack version. Are 
you using SSL certificates with console proxy? If so can you check that they 
are valid and resolve to a valid hostname/ip for which the certificate was 
generated and/or fix as necessary. If you're using a custom CA, make sure to 
import the root CA certificate in Chrome.


Regards.

rohit.ya...@shapeblue.com 
www.shapeblue.com
53 Chandos Place, Covent Garden, London  WC2N 4HSUK
@shapeblue
  
 



[GitHub] cloudstack issue #1640: CLOUDSTACK-9458: Fix HA bug when VMs are stopped on ...

2016-08-18 Thread koushik-das
Github user koushik-das commented on the issue:

https://github.com/apache/cloudstack/pull/1640
  
Please use a proper ACS release for reporting bugs. In your case you may 
have to do some additional cherry-picks.

"Schedule restart" does multiple tasks. There is a method by this name in 
code, the name may not be the most appropriate but it does the following. So 
don't get confused with the name
1. Tries to find out if the VM is alive or not
2. If it is not able to determine conclusively if VM is alive, then it 
tries to fence off VM
3. After successful fencing, HA enabled VMs are restarted on another host, 
non-HA VMs are marked as Stopped

So as you see non-HA VMs are simply stopped when the host is determined as 
down and not restarted. It makes sense to mark them as stopped so that 
subsequent operations can be performed on the VMs, for e.g. selective VMs may 
be explicitly started on another host. If a host is down then power sync won't 
happen for that host and VM states on that host won't get updated.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


Re: cloudstack-usage no longer working / error saving account to cloud_usage db

2016-08-18 Thread Rajani Karuturi
role_id in account table shouldn't be null. If the upgrade was
successful, it should have updated it with proper mapping from
account type. (check the db upgrade log for any exceptions)

I suggest you do the update manually following the logic at
https://github.com/apache/cloudstack/blob/4.9/engine/schema/src/com/cloud/upgrade/dao/Upgrade481to490.java#L68-L92

Also check that roles and role_permissions tables have the
required data.

~ Rajani
http://cloudplatform.accelerite.com/

On August 16, 2016 at 7:10 PM, Stephan Seitz
(s.se...@secretresearchfacility.com) wrote:
Hi!

We've recently noticed cloudstack-usage is no longer able to
write
usage data into mysql. I assume this happened after updateing to
4.8.0.1 or 4.9 - we missed that error in our testsetup...

Here's the usage.log: http://pastebin.com/Zpvnw4xX

Finally it fails with following message:

ERROR [usage.dao.UsageDaoImpl] (Usage-Job-1:null) (logid:) error
saving
account to cloud_usage db

I've checked the changes between 4.8 and 4.9

https://fossies.org/diffs/apache-cloudstack/4.8.0.1-src_vs_4.9.0-src/en
gine/schema/src/com/cloud/usage/dao/UsageDaoImpl.java-diff.html

cloud_usage.account now shows role_id, but that table looks good
to me:

mysql> show create table account \G
*** 1. row ***
Table: account
Create Table: CREATE TABLE `account` (
`id` bigint(20) unsigned NOT NULL,
`account_name` varchar(100) DEFAULT NULL COMMENT 'an account
name set
by the creator of the account, defaults to username for single
accounts',
`uuid` varchar(40) DEFAULT NULL,
`type` int(1) unsigned NOT NULL,
`role_id` bigint(20) unsigned DEFAULT NULL,
`domain_id` bigint(20) unsigned DEFAULT NULL,
`state` varchar(10) NOT NULL DEFAULT 'enabled',
`removed` datetime DEFAULT NULL COMMENT 'date removed',
`cleanup_needed` tinyint(1) NOT NULL DEFAULT '0',
`network_domain` varchar(100) DEFAULT NULL COMMENT 'Network
domain
name of the Vms of the account',
`default_zone_id` bigint(20) unsigned DEFAULT NULL,
`default` int(1) unsigned NOT NULL DEFAULT '0' COMMENT '1 if
account
is default',
PRIMARY KEY (`id`),
UNIQUE KEY `uc_account__uuid` (`uuid`),
KEY `i_account__removed` (`removed`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8
1 row in set (0.00 sec)

Having a look at that data, I'm a bit confused since uuid,
network_domain and default_zone_id are NULL for every account.

As an example:

mysql> select * from account limit 1 \G
*** 1. row ***
id: 1
account_name: system
uuid: NULL
type: 1
role_id: NULL
domain_id: 1
state: enabled
removed: NULL
cleanup_needed: 0
network_domain: NULL
default_zone_id: NULL
default: 0
1 row in set (0.00 sec)

I've already looked at plain SQL statements logged by the mysqld,
but
that's really messy and grepping for INSERT/UPDATE queries
defined in
UsageDaoImpl didn't show anything. Finally grepping for
'statistics' in
the raw sql-log doesn't result a line.

Could someone please shed some light how I could get the usage
service
collecting and reporting data again?

Thanks in advance!

cheers,

- Stephan

[GitHub] cloudstack issue #1640: CLOUDSTACK-9458: Fix HA bug when VMs are stopped on ...

2016-08-18 Thread marcaurele
Github user marcaurele commented on the issue:

https://github.com/apache/cloudstack/pull/1640
  
@koushik-das We are running a fork based on 4.4.2 with lots of 
cherry-pickings.

But even if the host is down, why would you want to schedule a restart if 
the VM are not HA enabled?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack issue #1640: CLOUDSTACK-9458: Fix HA bug when VMs are stopped on ...

2016-08-18 Thread koushik-das
Github user koushik-das commented on the issue:

https://github.com/apache/cloudstack/pull/1640
  
@marcaurele Based on the initial few lines of the logs the agent went to 
Alert state.

srv02 2016-08-08 11:56:03,895 DEBUG [agent.manager.AgentManagerImpl] 
(AgentTaskPool-16:ctx-8b5b6956) The next status of agent 44692is Alert, current 
status is Up
srv02 2016-08-08 11:56:03,896 DEBUG [agent.manager.AgentManagerImpl] 
(AgentTaskPool-16:ctx-8b5b6956) Deregistering link for 44692 with state Alert

As per the latest ACS code (4.9/master) restart of VMs on a host are 
scheduled only if the state of host is determined as Down. In case of Alert 
nothing is done.

On what version of CS are you seeing this issue?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack issue #1640: CLOUDSTACK-9458: Fix HA bug when VMs are stopped on ...

2016-08-18 Thread marcaurele
Github user marcaurele commented on the issue:

https://github.com/apache/cloudstack/pull/1640
  
> Would you mind adding these notes to the bug ticket?

@jburwell All PR comments are going automatically into the jira ticket 
comment thanks to the ID matching (I think).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] cloudstack pull request #1640: CLOUDSTACK-9458: Fix HA bug when VMs are stop...

2016-08-18 Thread marcaurele
Github user marcaurele commented on a diff in the pull request:

https://github.com/apache/cloudstack/pull/1640#discussion_r75252604
  
--- Diff: server/src/com/cloud/ha/HighAvailabilityManagerImpl.java ---
@@ -497,7 +498,7 @@ protected Long restart(final HaWorkVO work) {
 
 boolean fenced = false;
 if (alive == null) {
-s_logger.debug("Fencing off VM that we don't know the 
state of");
+s_logger.debug("Fencing off VM " + vm + " that we 
don't know the state of");
--- End diff --

Turning all of those log debug lines without a `if` statement to lambda 
expressions when we require Java8 would be easier if there're not wrapped 
within a `if`:
```
s_logger.debug(() -> "Fencing off VM " + vm + " that we don't know the 
state of");
```
with
```
default void debug(Supplier stringSupplier) {
if (isDebugEnabled()) {
debug(stringSupplier.get());
}
}
```
The concatenation will be only done when debug is enabled.

You're right, I turn it to `warn`.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---