GithubHelp home page GithubHelp logo

Comments (9)

bibekmantree avatar bibekmantree commented on April 20, 2024

is this issue solved.?
am getting this error in aliyuncli too

from alibaba.alicloud.

xiaozhu36 avatar xiaozhu36 commented on April 20, 2024

Hi @padpad17 ,

I am so sorry for your experience. Above issue I can't happened while testing. Which region were you used? Please give me more information to help me to locate error reason quickly, thanks a lot.

Regards,
He Guimin

from alibaba.alicloud.

manicai avatar manicai commented on April 20, 2024

I've seen the same issue. Request timeout creating VPCs and VSwitches (though both actually succeeded). For instances I got "Unable to create instance, error: HTTP Status: 400 Error:UnknownError The request processing has failed due to some unknown error. RequestID: 3741507B-8CB9-4188-9995-8EA4A695B254"

This is using the US-West-1 region.

Playbook (pretty much the example from the docs):

- hosts: localhost
  tasks:
    - name: Create Compute VPC
      alicloud_vpc:
        vpc_name: "{{ vpc_name }}"
        alicloud_region: "{{ region }}"
        state: present
        cidr_block: '{{ cidr_block }}'
      register: created_vpc

    - name: Create VSwitch
      alicloud_vswitch:
        alicloud_region: "{{ region }}"
        alicloud_zone: "{{ availability_zone }}"
        cidr_block: "{{ cidr_block }}"
        vswitch_name: "{{ vswitch_name }}"
        vpc_id: "{{ created_vpc.vpc_id }}"
      register: created_vsw

    - name: Create security group
      alicloud_security_group:
        name: bastion_access
        vpc_id: '{{ created_vpc.vpc_id }}'
        alicloud_region: "{{ region }}"
        rules:
          - proto: tcp
            port_range: 22/22
            cidr_ip: "{{home_ip}}"
            priority: 1
      register: bastion_access_group

    - name: Create bastion
      alicloud_instance:
         alicloud_region: "{{ region }}"
         group_id: '{{ bastion_access_group.group_id }}'
         instance_type: ecs.n4.small
         image_id: "{{ bastion_ami }}"
         instance_name: "Bastion"
         instance_tags:
             Name: Bastion
             Version: 0.0.1
         count: 1
         count_tag:
             Name: Bastion
         allocate_public_ip: true
         instance_charge_type: "PostPaid"
         internet_charge_type: "PayByTraffic"
         host_name: "bastion"
         vswitch_id: '{{ created_vsw.vswitch_id}}'
      register: create_instance
  vars:
    cidr_block: "10.0.1.0/24"
    region: "us-west-1"
    availability_zone: "us-west-1a"

Versions being used:

$ pip freeze
acme==0.10.2
aliyun-python-sdk-core==2.4.2
aliyun-python-sdk-ecs==4.1.0
aliyun-python-sdk-rds==2.1.0
aliyun-python-sdk-slb==3.2.0
ansible==2.3.0.0
ansible-alicloud==1.0.8
appdirs==1.4.3
asn1crypto==0.22.0
backports.shutil-get-terminal-size==1.0.0
boto==2.45.0
boto3==1.4.4
botocore==1.5.7
certbot==0.10.2
cffi==1.10.0
ConfigArgParse==0.11.0
configobj==5.0.6
crcmod==1.7
cryptography==1.8.1
decorator==4.0.11
docutils==0.13.1
enum34==1.1.6
footmark==1.1.10
funcsigs==1.0.2
future==0.16.0
futures==3.0.5
idna==2.5
importlib==1.0.4
ipaddress==1.0.18
ipython==5.1.0
ipython-genutils==0.1.0
Jinja2==2.9.6
jmespath==0.9.1
letsencrypt==0.7.0
MarkupSafe==1.0
mock==2.0.0
netaddr==0.7.19
oss2==2.3.4
packaging==16.8
paramiko==2.1.2
parsedatetime==2.2
pathlib2==2.2.1
pbr==1.10.0
pexpect==4.2.1
pickleshare==0.7.4
pkg-resources==0.0.0
prompt-toolkit==1.0.9
ptyprocess==0.5.1
pyasn1==0.2.3
pycparser==2.17
pycrypto==2.6.1
Pygments==2.2.0
pyOpenSSL==16.2.0
pyparsing==2.2.0
pyRFC3339==1.0
python-dateutil==2.6.0
pytz==2016.10
PyYAML==3.12
requests==2.13.0
s3transfer==0.1.10
scandir==1.4
simplegeneric==0.8.1
six==1.10.0
subprocess32==3.2.7
traitlets==4.3.1
wcwidth==0.1.7
zope.component==4.3.0
zope.event==4.2.0
zope.interface==4.3.3

from alibaba.alicloud.

padpad17 avatar padpad17 commented on April 20, 2024

Hi @xiaozhu36,

I run the playbook against eu-central-1. The rest works really good and I appreciate your module very much.

regards,
padpad

from alibaba.alicloud.

xiaozhu36 avatar xiaozhu36 commented on April 20, 2024

Hi @padpad17

That's great. Thank you! The error may come from network, and I will keep following up and try my best to fix it.

Regards,
He Guimin

from alibaba.alicloud.

xiaozhu36 avatar xiaozhu36 commented on April 20, 2024

Hi @manicai

Thank you for using our ansible provider and your feedback. I have traced the reason and you should set max_bandwidth_out before allocationg public ip. Thanks.

Regards,
He Guimin

from alibaba.alicloud.

xiaozhu36 avatar xiaozhu36 commented on April 20, 2024

Hi @badbond420

I think the error results from network, and you can push issue in https://github.com/aliyun/aliyun-cli to get exact reason, thanks.

Regards,
He Guimin

from alibaba.alicloud.

padpad17 avatar padpad17 commented on April 20, 2024

Hi @xiaozhu36,

I had a look at the footmark python module which contains a wait and wait_timeout parameter:

def create_image(self, snapshot_id=None, image_name=None, image_version=None, description=None, images_tags=None, instance_id=None, disk_mapping=None, launch_permission=None, wait=None, wait_timeout=None):

decription within footmark/ecs/connection.py

:type wait: string :param wait: An optional bool value indicating wait for instance to be running before running
:type wait_timeout: int :param wait_timeout: time interval of waiting :param wait_timeout: An optional int value indicating how long to wait, default 300

Your alibaba_instance.py doesn´t use it though:

# call to create_instance method from footmark instances = ecs.create_instance(image_id=image_id, instance_type=instance_type, group_id=group_id, zone_id=zone_id, instance_name=instance_name, description=description, internet_charge_type=internet_charge_type, max_bandwidth_out=max_bandwidth_out, max_bandwidth_in=max_bandwidth_in, host_name=host_name, password=password, io_optimized='optimized', system_disk_category=system_disk_category, system_disk_size=system_disk_size, system_disk_name=system_disk_name, system_disk_description=system_disk_description, vswitch_id=vswitch_id, count=exact_count, allocate_public_ip=allocate_public_ip, instance_charge_type=instance_charge_type, period=period, auto_renew=auto_renew, auto_renew_period=auto_renew_period, instance_tags=instance_tags)

The default should be 300. Whatever 300 is, seconds, milliseconds, I don´t know. But eben if it is seconds, the SDK timeout happens after aproximatly 10-20 seconds after the task has started.

It is just an idea and what we have figured out yet.

Regards,
padpad

PS: we just figured out that running a playbook with security rules to the same vpc/vswitch a second time, that the rules will created again with same name but different ruleID. Do you want me to add another issue for that?

from alibaba.alicloud.

xiaozhu36 avatar xiaozhu36 commented on April 20, 2024

Hi @padpad17

Thank you very much for you contribution. I am sorry for that 'wait' and 'wait_timeout' make you be misleading. At present, 'wait' and 'wait_timeout' have some defects and we are redesigning them and will published in the future version, please be patient, thanks.

The current issue is good and there is no need a new one.

Regards
He Guimin

from alibaba.alicloud.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.