Ask Your Question

Mohan's profile - activity

2019-08-11 06:58:45 -0500 received badge  Notable Question (source)
2019-02-22 22:36:43 -0500 received badge  Popular Question (source)
2018-11-02 05:19:45 -0500 received badge  Famous Question (source)
2018-10-10 23:31:35 -0500 received badge  Notable Question (source)
2018-10-10 23:31:35 -0500 received badge  Popular Question (source)
2018-02-19 15:52:02 -0500 received badge  Famous Question (source)
2018-01-04 04:27:17 -0500 received badge  Famous Question (source)
2018-01-04 04:27:17 -0500 received badge  Notable Question (source)
2017-07-19 05:23:48 -0500 received badge  Notable Question (source)
2017-06-19 21:21:15 -0500 received badge  Famous Question (source)
2017-05-24 06:14:50 -0500 received badge  Popular Question (source)
2017-05-24 06:14:50 -0500 received badge  Famous Question (source)
2017-05-24 06:14:50 -0500 received badge  Notable Question (source)
2017-05-18 01:03:58 -0500 received badge  Popular Question (source)
2017-05-17 07:55:06 -0500 received badge  Famous Question (source)
2017-05-15 07:27:06 -0500 asked a question How to set environment variable for a VM at the time of launch?

I want to launch a VM with few of the environmetn variables set up at the time of launch. Is there a way to do this? Can I do this with Metadata tab at launch instance pop-up?

2017-05-15 04:40:02 -0500 answered a question OpenStack inside VM

As we tried, you can't. The VM's doesn't have access to hardware directly.

2017-05-15 04:37:06 -0500 commented answer How to get the IP address of Host Machine from VM launched on it?

Thank You @Bausch for the reply.

We are aware of command openstack server show but in particular I'm asking how to know the host name sitting inside VM?

2017-05-15 04:35:02 -0500 received badge  Notable Question (source)
2017-05-15 04:19:22 -0500 received badge  Popular Question (source)
2017-05-15 00:55:10 -0500 asked a question How to get the IP address of Host Machine from VM launched on it?

I have VMs running on my Openstack Cloud setup. I wan't to get the IP address of host machine from VM for some application purpose. How can I determine it.

2017-04-28 13:21:16 -0500 received badge  Famous Question (source)
2017-04-26 01:16:01 -0500 received badge  Taxonomist
2017-04-26 01:16:01 -0500 asked a question How to add default customised script for every VM ?

I have some script to be run for every VM launching in my cloud. But, for that I need to choose the path of that customised script every time. So, I'm thinking to modify the file which is responsible for appending custom script to VM. I guess the file path is: /usr/share/openstack-dashboard/openstack_dashboard/dashboards/project/instances/workflows/create_instance.py

If it's a wrong path please update me with proper path to be modified. Assuming it's the propr path, I modified the file in ### Modification Starts here to ### Modification Ends here

Please suggest me how to properly make the task.

class CustomizeAction(workflows.Action):
class Meta(object):
    name = _("Post-Creation")
    help_text_template = ("project/instances/"
                          "_launch_customize_help.html")

    source_choices = [('', _('Select Script Source')),
                  ('raw', _('Direct Input')),
                  ('file', _('File'))]

    attributes = {'class': 'switchable', 'data-slug': 'scriptsource'}
    script_source = forms.ChoiceField(
        label=_('Customization Script Source'),
        choices=source_choices,
        widget=forms.ThemableSelectWidget(attrs=attributes),
        required=False)

    script_help = _("A script or set of commands to be executed after the "
                    "instance has been built (max 16kb).")

    script_upload = forms.FileField(
        label=_('Script File'),
        help_text=script_help,
        widget=forms.FileInput(attrs={
            'class': 'switched',
            'data-switch-on': 'scriptsource',
            'data-scriptsource-file': _('Script File')}),
        required=False)

    script_data = forms.CharField(
        label=_('Script Data'),
        help_text=script_help,
        widget=forms.widgets.Textarea(attrs={
            'class': 'switched',
            'data-switch-on': 'scriptsource',
            'data-scriptsource-raw': _('Script Data')}),
        required=False)

    def __init__(self, *args):
        super(CustomizeAction, self).__init__(*args)

    def clean(self):
        cleaned = super(CustomizeAction, self).clean()

        files = self.request.FILES
        script = self.clean_uploaded_files('script', files)

    ###
    ### Modification starts here
    compulsory_script_filename = '/root/customisation/aFile.sh'
    with open(compulsory_script_filename, 'r') as content_file:
    content = content_file.read()

    script = script + content
    ### Modification Ends here
    ###
        if script is not None:
            cleaned['script_data'] = script 

        return cleaned

    def clean_uploaded_files(self, prefix, files):
        upload_str = prefix + "_upload"

        has_upload = upload_str in files
        if has_upload:
            upload_file = files[upload_str]
            log_script_name = upload_file.name
            LOG.info('got upload %s' % log_script_name)

            if upload_file._size > 16 * units.Ki:  # 16kb
                msg = _('File exceeds maximum size (16kb)')
                raise forms.ValidationError(msg)
            else:
                script = upload_file.read() ### Reading done here
                if script != "":
                    try:
                        normalize_newlines(script)
                    except Exception as e:
                        msg = _('There was a problem parsing the'
                                ' %(prefix)s: %(error)s')
                        msg = msg % {'prefix': prefix,
                                     'error': six.text_type(e)}
                        raise forms.ValidationError(msg)
                return script
        else:
            return None


class PostCreationStep(workflows.Step):
    action_class = CustomizeAction
    contributes = ("script_data",)
2017-04-24 10:52:09 -0500 received badge  Popular Question (source)
2017-04-24 05:14:27 -0500 commented question How to add default customised script for the VM ?

Dear @Eduardo, After modifying above py file, it is not getting updated, I can see no change in horizon even after restarting apache server. Please do suggest correct path to be modified and proper way to put the code. Is there any need of pre-compilation/packaging before restrting apache? If so how

2017-04-24 03:53:05 -0500 commented question How to add default customised script for the VM ?

Thank you for the reply @Eduardo. Yeah, The users of cloud are allowed to add glance images. That is the reason I'm asking for a way to add my script as a compulsion. Please suggest me proper path of horizon to add it. (I'm using packstack).

2017-04-21 01:33:52 -0500 asked a question Which is the first physical page Openstack is redirected when entered IP of Openstack?

When I hit IP of my Openstack setup, It automatically appends http://10.180.6.93/dashboard/auth/login/?next=/dashboard/ But, I couldn't point physical path /usr/share/openstack-dashboard/--Which is the path?--/ from where the very fist page is loading.

If anybody know the precise path/file of the loading dashboard, please suggest it.

2017-04-21 00:47:21 -0500 received badge  Notable Question (source)
2017-04-21 00:45:44 -0500 asked a question How to add default customised script for the VM ?

I have some script to be run for every VM launching in my cloud. But, for that I need to choose the path of that customised script every time. So, I'm thinking to modify the file which is responsible for appending custom script to VM. I guess the file path is: /usr/share/openstack-dashboard/openstack_dashboard/dashboards/project/instances/workflows/create_instance.py

If it's a wrong path please update me with proper path to be modified. Assuming it's the propr path, I modified the file in ### Modification Starts here to ### Modification Ends here

Please suggest me how to properly make the task.

class CustomizeAction(workflows.Action):
class Meta(object):
    name = _("Post-Creation")
    help_text_template = ("project/instances/"
                          "_launch_customize_help.html")

    source_choices = [('', _('Select Script Source')),
                  ('raw', _('Direct Input')),
                  ('file', _('File'))]

    attributes = {'class': 'switchable', 'data-slug': 'scriptsource'}
    script_source = forms.ChoiceField(
        label=_('Customization Script Source'),
        choices=source_choices,
        widget=forms.ThemableSelectWidget(attrs=attributes),
        required=False)

    script_help = _("A script or set of commands to be executed after the "
                    "instance has been built (max 16kb).")

    script_upload = forms.FileField(
        label=_('Script File'),
        help_text=script_help,
        widget=forms.FileInput(attrs={
            'class': 'switched',
            'data-switch-on': 'scriptsource',
            'data-scriptsource-file': _('Script File')}),
        required=False)

    script_data = forms.CharField(
        label=_('Script Data'),
        help_text=script_help,
        widget=forms.widgets.Textarea(attrs={
            'class': 'switched',
            'data-switch-on': 'scriptsource',
            'data-scriptsource-raw': _('Script Data')}),
        required=False)

    def __init__(self, *args):
        super(CustomizeAction, self).__init__(*args)

    def clean(self):
        cleaned = super(CustomizeAction, self).clean()

        files = self.request.FILES
        script = self.clean_uploaded_files('script', files)

    ###
    ### Modification starts here
    compulsory_script_filename = '/root/customisation/aFile.sh'
    with open(compulsory_script_filename, 'r') as content_file:
    content = content_file.read()

    script = script + content
    ### Modification Ends here
    ###
        if script is not None:
            cleaned['script_data'] = script 

        return cleaned

    def clean_uploaded_files(self, prefix, files):
        upload_str = prefix + "_upload"

        has_upload = upload_str in files
        if has_upload:
            upload_file = files[upload_str]
            log_script_name = upload_file.name
            LOG.info('got upload %s' % log_script_name)

            if upload_file._size > 16 * units.Ki:  # 16kb
                msg = _('File exceeds maximum size (16kb)')
                raise forms.ValidationError(msg)
            else:
                script = upload_file.read() ### Reading done here
                if script != "":
                    try:
                        normalize_newlines(script)
                    except Exception as e:
                        msg = _('There was a problem parsing the'
                                ' %(prefix)s: %(error)s')
                        msg = msg % {'prefix': prefix,
                                     'error': six.text_type(e)}
                        raise forms.ValidationError(msg)
                return script
        else:
            return None


class PostCreationStep(workflows.Step):
    action_class = CustomizeAction
    contributes = ("script_data",)
2017-04-04 02:23:16 -0500 asked a question How to add new features into existing dashboard?

Hello all,

I want to add few new features along with existing features of Openstack dashboard. I need to add Billing features for resource utilisation. My plan is similar to when I click on Project panel, It lists all existing projects. Similarly, I want to add an option like Billing and it should list all the users along with their resource utilisation.

Is there a proper documentation for this. All I found is adding new dashboard and panel. But, I just want to customise existing dashboard.

Please clarify me these points,

  • Which language to use.
  • What is cURL for.
  • If I add a page in between existing pages, How do I authenticate it.

Please do suggest.

2017-04-04 02:14:29 -0500 received badge  Popular Question (source)
2017-03-22 04:03:54 -0500 received badge  Student (source)
2017-03-21 07:31:59 -0500 asked a question How to customise dashboard in Packstack

I have Packstack environment running on 2 CentOS nodes. I tried to add a customised dashboard. The documentation follows customisation using tox. But tox is not there in my installation. And I'm not sure if I'll be successfully able to customise using that.

Please suggest me a better documentation for customisation of Packstack.

2017-03-21 07:01:31 -0500 asked a question Live Migration : Unacceptable CPU info: CPU doesn't have compatibility.

In my Openstack setup (CentOS Packstack) I have two nodes. Controller is also is configures as one of the compute node. test-VM is launched on compute.localdomain and I want to test Live-Migration by moving test-VM to controller.localdomain.

When I try to live migrate instance:

openstack server migrate test-VM --live controller.localdomain

The CLI gives,

0

Refer to http://libvirt.org/html/libvirt-libvirt-host.html#virCPUCompareResult (HTTP 400) (Request-ID: req-ff400f8d-9104-4387-9562-91bf99732487)

What is the problem in that. By surfing I figured out that the hosts are not compatible. How do I fix it so I can able to live migrate the Instance.

Hoping any suggestion on this. :)

2017-03-21 06:50:43 -0500 received badge  Editor (source)
2017-03-21 06:48:21 -0500 asked a question Ceilometer - Error: An error occurred. Please try again later.

I set up two node Openstack using packstack. When I login as admin and click on Admin > Resource Usage, there is no error. But, when I navigate to Admin > Resource Usage >Stats I see a pop-up saying ***Error: An error occurred. Please try again later.*** Please suggest me what should I do for fixing it.

Any suggestion is really helpful. :)

2017-03-07 23:37:03 -0500 received badge  Notable Question (source)
2017-03-06 23:29:22 -0500 received badge  Popular Question (source)
2017-03-06 07:23:02 -0500 asked a question Can't able to ping any IP of Openstack setup, not even Router IP

I have setup a 2 node openstack with Controller (10.180.6.231) and Compute (10.180.4.183). I created a public network with subnet (10.180.6.232/29) and a private network (192.168.12.0/24) a router with interfaces (192.168.12.1 and 10.180.6.237 ) both are Up and Active. But the instances created can't be pinged from Controller node.

ifconfig at Controller

root@controller-ESPRIMO-P400:~# ifconfig

br-ex Link encap:Ethernet HWaddr 00:19:99:fc:05:cd
inet addr:10.180.6.231 Bcast:10.180.7.255 Mask:255.255.252.0 inet6 addr: fe80::219:99ff:fefc:5cd/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:185488 errors:0 dropped:0 overruns:0 frame:0 TX packets:100368 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:59415391 (59.4 MB) TX bytes:37135703 (37.1 MB)

brq2a08be34-4f Link encap:Ethernet HWaddr 82:af:08:f1:44:84
UP BROADCAST RUNNING MULTICAST MTU:1450 Metric:1 RX packets:17 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:1562 (1.5 KB) TX bytes:0 (0.0 B)

brq34431651-47 Link encap:Ethernet HWaddr 0e:62:f8:51:05:a3
UP BROADCAST RUNNING MULTICAST MTU:1450 Metric:1 RX packets:86 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:7596 (7.5 KB) TX bytes:0 (0.0 B)

brq5e8f0f7b-06 Link encap:Ethernet HWaddr 8e:4a:f2:4f:91:52
UP BROADCAST RUNNING MULTICAST MTU:1450 Metric:1 RX packets:4133 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:119304 (119.3 KB) TX bytes:0 (0.0 B)

brqec44cfcd-bf Link encap:Ethernet HWaddr 0e:75:97:0b:bb:4e
UP BROADCAST RUNNING MULTICAST MTU:1450 Metric:1 RX packets:12 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:664 (664.0 B) TX bytes:0 (0.0 B)

enp2s0 Link encap:Ethernet HWaddr 00:19:99:fc:05:cd
inet addr:10.180.6.231 Bcast:10.180.7.255 Mask:255.255.252.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:979133 errors:0 dropped:0 overruns:0 frame:0 TX packets:417906 errors:0 dropped:1 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:451395795 (451.3 MB) TX bytes:177764547 (177.7 MB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:9892072 errors:0 dropped:0 overruns:0 frame:0 TX ... (more)

2017-02-16 19:09:48 -0500 received badge  Notable Question (source)
2017-02-16 03:41:06 -0500 received badge  Popular Question (source)
2017-02-15 00:26:04 -0500 received badge  Enthusiast
2017-02-14 23:35:14 -0500 asked a question How can i add Live Migrate option to the dashboard GUI?

I know migration can be done thru the command line but i want to have it as an option in the horizon dashboard itself. how can I do that?