anva's profile - activity

2020-02-18 02:55:07 -0500 received badge  Notable Question (source)
2020-02-18 02:55:07 -0500 received badge  Famous Question (source)
2017-08-01 01:57:06 -0500 received badge  Famous Question (source)
2017-07-25 05:10:25 -0500 asked a question Using CLI to attach a volume to a VM returns successful even if the operation did not work

By implementation the code for attaching a volume to a VM does not wait to get a respons if the attaching was succeful or not. The user of the CLI gets the device node on which the volume was attached even if the operation of attaching did not succeed. /nova/compute/api.py code _attach_volume calls self.compute_rpcapi.attach_volume(context, instance, volume_bdm) which by implementation does cctxt.cast(ctxt, 'attach_volume', instance=instance, bdm=bdm). Because of using the cast mechanism it will not wait for a reply from the Compute node where the actual work is done, so it will never know if the attachment was succeful, and will inform the CLI user with the expected succeful yaml, according to the Openstack Compute API. RESP BODY: {"volumeAttachment": {"device": "/dev/vdc", "serverId": "04ab7b2d-daf5-4ef7-9266-e90777d5a377", "id": "6589aaef-7d9d-45d5-af0a-a6cdbaca1a7a", "volumeId": "6589aaef-7d9d-45d5-af0a-a6cdbaca1a7a"}}

Proposal:

To use a call instead of a cast and return to the CLI user the right answer, according to what actually happened on the compute node. The downside of this would be that it blocks the console where the CLI command was issued for the time it takes to actually attach the volume on the compute node.

Question: Why a cast is prefered against a call? Did you too in account to use a call and decided that a better way is with cast, and let the user know the device where would be attached the volume if successful?

Many thanks, Andrei Varvara

2017-07-25 05:09:04 -0500 asked a question Using CLI to attach a volume to a VM returns successful even if the operation did not work

By implementation the code for attaching a volume to a VM does not wait to get a respons if the attaching was succeful or not. The user of the CLI gets the device node on which the volume was attached even if the operation of attaching did not succeed. /nova/compute/api.py code _attach_volume calls self.compute_rpcapi.attach_volume(context, instance, volume_bdm) which by implementation does cctxt.cast(ctxt, 'attach_volume', instance=instance, bdm=bdm). Because of using the cast mechanism it will not wait for a reply from the Compute node where the actual work is done, so it will never know if the attachment was succeful, and will inform the CLI user with the expected succeful yaml, according to the Openstack Compute API. RESP BODY: {"volumeAttachment": {"device": "/dev/vdc", "serverId": "04ab7b2d-daf5-4ef7-9266-e90777d5a377", "id": "6589aaef-7d9d-45d5-af0a-a6cdbaca1a7a", "volumeId": "6589aaef-7d9d-45d5-af0a-a6cdbaca1a7a"}}

Proposal:

To use a call instead of a cast and return to the CLI user the right answer, according to what actually happened on the compute node. The downside of this would be that it blocks the console where the CLI command was issued for the time it takes to actually attach the volume on the compute node.

Question: Why a cast is prefered against a call? Did you too in account to use a call and decided that a better way is with cast, and let the user know the device where would be attached the volume if successful?

Many thanks, Andrei Varvara

2017-02-02 09:18:25 -0500 received badge  Notable Question (source)
2017-01-09 15:49:15 -0500 received badge  Popular Question (source)
2016-12-21 02:21:16 -0500 received badge  Popular Question (source)
2016-12-20 04:11:15 -0500 asked a question Ceilometer alarm where should I look for the LOG? --alarm-action 'log://'

I am using ceilometer version 2.4.0 and openstack version 2.2.0

root@node-1:~# ceilometer --version
2.4.0
root@node-1:~# openstack --version
openstack 2.2.0

I am trying to do an alarm which has to be triggered when cpu utilization is greater then 50% for more than 60 seconds. Below is the command that I have used:

 ceilometer alarm-threshold-create --name enea_cpu_anva --description "Anva instance running hot" --meter-name cpu_util --threshold 50 --comparison-operator gt --statistic avg --period 60 --evaluation-periods 1 --repeat-actions True --enabled True --alarm-action 'log://' --query resource_id=34ef4464-1c18-4b84-97cd-ed57e2ac6b91

+---------------------------+-----------------------------------------------------+
| Property                  | Value                                               |
+---------------------------+-----------------------------------------------------+
| alarm_actions             | ["log://"]                                          |
| alarm_id                  | 7e7e9a8e-7a78-4a4e-9cc3-ff3f6dafcff2                |
| comparison_operator       | gt                                                  |
| description               | Anva instance running hot                           |
| enabled                   | True                                                |
| evaluation_periods        | 1                                                   |
| exclude_outliers          | False                                               |
| insufficient_data_actions | []                                                  |
| meter_name                | cpu_util                                            |
| name                      | enea_cpu_anva                                       |
| ok_actions                | []                                                  |
| period                    | 60                                                  |
| project_id                | 4b1e55cab804430498ea81c2851e83aa                    |
| query                     | resource_id == 34ef4464-1c18-4b84-97cd-ed57e2ac6b91 |
| repeat_actions            | True                                                |
| severity                  | low                                                 |
| state                     | insufficient data                                   |
| statistic                 | avg                                                 |
| threshold                 | 50.0                                                |
| type                      | threshold                                           |
| user_id                   | e2d0d048bb194b5ea5b81206ba46e17f                    |
+---------------------------+-----------------------------------------------------+

root@node-1:~# ceilometer alarm-list
+--------------------------------------+---------------+-------------------+----------+---------+------------+---------------------------------------+----------                --------+
| Alarm ID                             | Name          | State             | Severity | Enabled | Continuous | Alarm condition                       | Time cons                traints |
+--------------------------------------+---------------+-------------------+----------+---------+------------+---------------------------------------+----------   
| 7e7e9a8e-7a78-4a4e-9cc3-ff3f6dafcff2 | enea_cpu_anva | insufficient data | low      | True    | True       | avg(cpu_util) > 50.0 during 1 x 60s   | None

I have logged on the VM instance and made CPU to have constant 90% utilization.

Please let me know where should I look for the allarm log since I can't find any notifications. The alarm was created with --alarm-action 'log://" but I don't know where it logs and from documentation I can't find it.

This is copy paste from documentation:

"
Log actions

These are a lightweight alternative to webhooks, whereby the state transition is simply logged by the alarm-notifier, and are intended primarily for testing purposes.

"

Many thanks, Andrei Varvara

2016-11-09 16:54:42 -0500 received badge  Student (source)
2016-11-09 10:28:18 -0500 asked a question Same Key Pair manual download gives other private key while keeping the same public key???

I have created a Key Pair. Intructed the new instance to use this new key. Downloaded the key "A key pair named 'merge' was successfully created. This key pair should automatically download. If not, you can manually dowload this keypair at the following link:" manually by following the link. Then I said to the instance to not use that key by clicking "-" and then I "+" it again to use it for that instance and then asked to download again the private key. The surprize was that it differs from the previous one but the public key is the same. Please let me know why this happens. I know RSA is one to one key, one public and one private. not one public and many privates as I get when downloading manually. Hope I was clear enought, if not let me know and I will try explaining better.