Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zabbix_screen.py: host search using multiple group #64428

Open
wants to merge 1 commit into
base: devel
from

Conversation

@akiko-amino
Copy link

akiko-amino commented Nov 5, 2019

SUMMARY

Allow host search/filter to be done using multiple groups.
Will give hosts that has link to all the given groups.

ISSUE TYPE
  • Docs Pull Request

+label: docsite_pr

SUMMARY

Instead of just picking one host_group, use list of host_groups. This allows easily
to filter by multiple host groups.

This change is also fully backwards compatible.

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

zabbix_screen.py

ADDITIONAL INFORMATION

Example Use case:
Hosts are grouped in zabbix by service type and by customer.
Need to create screen wich has all customer 1 service type A hosts.

The change allows the creation by giving host_groups: ['customer1','service type A']

@ansibot

This comment has been minimized.

@ansibot

This comment has been minimized.

Copy link
Contributor

ansibot commented Nov 5, 2019

The test ansible-test sanity --test pylint [explain] failed with 3 errors:

lib/ansible/modules/monitoring/zabbix/zabbix_screen.py:197:0: trailing-whitespace: Trailing whitespace
lib/ansible/modules/monitoring/zabbix/zabbix_screen.py:215:87: bad-whitespace: No space allowed before comma         host_list = self._zapi.host.get({'output': 'extend', 'selectGroups': 'groupid' , 'groupids': group_ids, 'monitored_hosts': 1})                                                                                        ^
lib/ansible/modules/monitoring/zabbix/zabbix_screen.py:226:0: trailing-whitespace: Trailing whitespace

The test ansible-test sanity --test pep8 [explain] failed with 3 errors:

lib/ansible/modules/monitoring/zabbix/zabbix_screen.py:197:1: W293: blank line contains whitespace
lib/ansible/modules/monitoring/zabbix/zabbix_screen.py:215:87: E203: whitespace before ','
lib/ansible/modules/monitoring/zabbix/zabbix_screen.py:226:1: W293: blank line contains whitespace

click here for bot help

@akiko-amino akiko-amino force-pushed the akiko-amino:patch-1 branch from 30d4e75 to d76683f Nov 5, 2019
@ansibot ansibot removed the ci_verified label Nov 5, 2019
@ansibot

This comment has been minimized.

Copy link
Contributor

ansibot commented Nov 5, 2019

The test ansible-test sanity --test pylint [explain] failed with 1 error:

lib/ansible/modules/monitoring/zabbix/zabbix_screen.py:215:87: bad-whitespace: No space allowed before comma         host_list = self._zapi.host.get({'output': 'extend', 'selectGroups': 'groupid' , 'groupids': group_ids, 'monitored_hosts': 1})                                                                                        ^

The test ansible-test sanity --test pep8 [explain] failed with 1 error:

lib/ansible/modules/monitoring/zabbix/zabbix_screen.py:215:87: E203: whitespace before ','

click here for bot help

@ansibot ansibot added the ci_verified label Nov 5, 2019
@akiko-amino akiko-amino force-pushed the akiko-amino:patch-1 branch from d76683f to 3c2fa8e Nov 5, 2019
@samccann samccann removed the docs label Nov 5, 2019
@ansibot ansibot removed the needs_triage label Nov 5, 2019
@ansibot ansibot added the stale_ci label Nov 13, 2019
@akiko-amino

This comment has been minimized.

Copy link
Author

akiko-amino commented Nov 18, 2019

@D3DeFi @cove @eikef @harrisongu @rubentsirunyan

Could someone check this?

Copy link
Contributor

D3DeFi left a comment

Hey @akiko-amino . First of all you are adding brand new module parameter host_groups alongside the old one host_group without properly documenting it in DOCUMENTATION section of the module. Lets prevent this (see specific comments in this review) and keep code as clean as possible:

  • update existing methods rather than implement new ones
  • use ansible for conversions to list and don't to this by yourself
  • documentation of the module needs to be updated to state that it is possible to add multiple groups and that only hosts that are part of them all will be added to the screen
try:
host_group = zabbix_screen['host_group']
host_groups = host_group if isinstance(host_group, list) else [host_group]
except KeyError:
host_groups = zabbix_screen['host_groups']
host_groups = host_groups if isinstance(host_groups, list) else [host_groups]
Comment on lines 443 to 448

This comment has been minimized.

Copy link
@D3DeFi

D3DeFi Nov 21, 2019

Contributor

There is no benefit to such handling of "hidden" module parameter. AnsibleModule should be fairly capable of doing this for us. What I mean is this:

    module = AnsibleModule(
        argument_spec=dict(
            host_group=dict(type='list', aliases=['host_groups']),
        ),
    )

    module.exit_json(ok=True, host_group=module.params['host_group'])

Will accept parameters in both formats and convert them to list:

    - testmod:
        host_group: abc

    - testmod:
        host_group:
          - abc
          - def

This comment has been minimized.

Copy link
@akiko-amino

akiko-amino Nov 29, 2019

Author

@D3DeFi Thanks for this, removed the useless try/catch and replaced with changing host_group str->list + added the alias.

@akiko-amino akiko-amino force-pushed the akiko-amino:patch-1 branch from 3c2fa8e to 36fabaa Nov 29, 2019
@ansibot

This comment has been minimized.

Copy link
Contributor

ansibot commented Nov 29, 2019

The test ansible-test sanity --test validate-modules [explain] failed with 1 error:

lib/ansible/modules/monitoring/zabbix/zabbix_screen.py:0:0: parameter-documented-multiple-times: Argument 'host_group' in argument_spec found in screens with aliases 'host_groups' is documented multiple times, namely as 'host_group', 'host_groups'

click here for bot help

Copy link
Contributor

D3DeFi left a comment

I am really sorry for the delay @akiko-amino !

Only a few documentation adjustements and it is good to go. Thank you for implementing my previous suggestions :)

@sky-joker can you take a look at this please? :)

host_groups:
description:
- Alias for host_group
type: list
Comment on lines 49 to 52

This comment has been minimized.

Copy link
@D3DeFi

D3DeFi Dec 8, 2019

Contributor

Remove this altogether please

@@ -149,6 +153,25 @@
graph_width: 200
graph_height: 100
when: inventory_hostname==groups['group_name'][0]
# Create/update using multiple hosts_groups

This comment has been minimized.

Copy link
@D3DeFi

D3DeFi Dec 8, 2019

Contributor

Maybe something more explicit here to state that host matching only one of the provided host groups are not being processed.

Suggested change
# Create/update using multiple hosts_groups
# Create/update using multiple hosts_groups. Hosts present in only one of the mentioned groups will be skipped
@D3DeFi

This comment has been minimized.

Copy link
Contributor

D3DeFi commented Dec 13, 2019

Just those small documentation changes I've requested a few days ago and this is good to go! :)

What do you think @sky-joker ?

@sky-joker

This comment has been minimized.

Copy link
Contributor

sky-joker commented Dec 22, 2019

Hi @akiko-amino

Thank you for the this patch :)
I got an error when running the below playbook in my lab using this patch applied module.
tested this module using zabbix 4.0.

---
- name: "zabbix_screen module test #64428"
  hosts: localhost
  gather_facts: no
  vars:
    zbx_auth_info: &zbx_auth_info
      server_url: zabbix server url
      login_user: admin
      login_password: zabbix
  tasks:
    - name: create screen
      zabbix_screen:
        <<: *zbx_auth_info
        screens:
          - screen_name: ExampleScreen1
            host_group:
              - Linux servers
              - Hypervisors
            graph_names:
              - Example graph1
              - Example graph2
            graph_width: 200
            graph_height: 100
            graphs_in_row: 5
            state: present

error

(venv) [root@zbxcont 64428]# ansible-playbook main.yml
[WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'


PLAY [zabbix module test] ******************************************************************************************************************************************************

TASK [create test] *************************************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "Failed to update screen ExampleScreen1: ('Error -32500: Application error., Incorrect value for field \"hsize\": must be between \"1\" and \"100\". while sending {\"jsonrpc\": \"2.0\", \"method\": \"screen.update\", \"params\": {\"screenid\": \"34\", \"hsize\": 0, \"vsize\": 1}, \"auth\": \"abad7254dd485fa0c8f1a256b5f34dbc\", \"id\": 7}', -32500)"}

PLAY RECAP *********************************************************************************************************************************************************************
localhost                  : ok=0    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0

The error did not occur when modifying the code as below.

--- before/zabbix_screen.py 2019-12-22 22:41:52.965985331 +0900
+++ after/zabbix_screen.py  2019-12-22 22:42:18.767500778 +0900
@@ -219,9 +219,8 @@
             host_ids = []
             for host in host_list:
                 host_group_ids = [g['groupid'] for g in host['groups']]
-                if set(group_ids).issubset(host_group_ids):
-                    host_id = host['hostid']
-                    host_ids.append(host_id)
+                host_id = host['hostid']
+                host_ids.append(host_id)
             return host_ids

     # get screen

Could you please check this part of the code?

@D3DeFi

This comment has been minimized.

Copy link
Contributor

D3DeFi commented Dec 23, 2019

If I understand this correctly, hsize is calculated based on number of hosts that will be placed to screen.

Based on this patch. If user provides multiple groups, which was not possible until now, only hosts that are present in both groups will be selected to the resulting screen.

Are there any hosts that are part of Linux Servers and Hypervisors at the same time in your setup @sky-joker ? If not, I think this is correct behavior and shouldn't be changed. Lets instead provide some kind of error to the user saying something like no hosts were found being members of the provided groups simultaneously when len(host_ids) < 1.

Completely different behavior would be if you are sure that there is at least one host, which is member of both Linux Servers and Hypervisors groups. Then this is bug and should be fixed, somewhere

@sky-joker

This comment has been minimized.

Copy link
Contributor

sky-joker commented Dec 25, 2019

Are there any hosts that are part of Linux Servers and Hypervisors at the same time in your setup @sky-joker ? If not, I think this is correct behavior and shouldn't be changed.

Oh, I get it.
I'm sorry it's my misunderstanding.
@akiko-amino, Please fix the failed sanity test.

@D3DeFi

This comment has been minimized.

Copy link
Contributor

D3DeFi commented Dec 27, 2019

Are there any hosts that are part of Linux Servers and Hypervisors at the same time in your setup @sky-joker ? If not, I think this is correct behavior and shouldn't be changed.

Oh, I get it.
I'm sorry it's my misunderstanding.
@akiko-amino, Please fix the failed sanity test.

To be honest, I was confused as well at first. Hence I requested documentation changes to include more specific example (at least)

@akiko-amino akiko-amino force-pushed the akiko-amino:patch-1 branch from a7b2943 to 4e8cbd3 Feb 14, 2020
@ansibot ansibot removed the needs_rebase label Feb 14, 2020
@ansibot

This comment has been minimized.

Copy link
Contributor

ansibot commented Feb 14, 2020

The test ansible-test sanity --test validate-modules [explain] failed with 2 errors:

lib/ansible/modules/monitoring/zabbix/zabbix_screen.py:0:0: doc-required-mismatch: Argument 'host_group' in argument_spec found in screens is not required, but is documented as being required
lib/ansible/modules/monitoring/zabbix/zabbix_screen.py:0:0: parameter-list-no-elements: Argument 'host_group' in argument_spec found in screens defines type as list but elements is not defined

The test ansible-test sanity --test pylint [explain] failed with 2 errors:

lib/ansible/modules/monitoring/zabbix/zabbix_screen.py:453:16: undefined-variable: Undefined variable 'self'
lib/ansible/modules/monitoring/zabbix/zabbix_screen.py:496:0: missing-final-newline: Final newline missing

The test ansible-test sanity --test pep8 [explain] failed with 1 error:

lib/ansible/modules/monitoring/zabbix/zabbix_screen.py:496:11: W292: no newline at end of file

click here for bot help

@ansibot ansibot added the ci_verified label Feb 14, 2020
@akiko-amino akiko-amino force-pushed the akiko-amino:patch-1 branch from 4e8cbd3 to 6483b6b Feb 14, 2020
@ansibot ansibot removed the ci_verified label Feb 14, 2020
@ansibot

This comment has been minimized.

Copy link
Contributor

ansibot commented Feb 14, 2020

The test ansible-test sanity --test validate-modules [explain] failed with 2 errors:

lib/ansible/modules/monitoring/zabbix/zabbix_screen.py:0:0: doc-required-mismatch: Argument 'host_group' in argument_spec found in screens is not required, but is documented as being required
lib/ansible/modules/monitoring/zabbix/zabbix_screen.py:0:0: parameter-list-no-elements: Argument 'host_group' in argument_spec found in screens defines type as list but elements is not defined

The test ansible-test sanity --test pylint [explain] failed with 1 error:

lib/ansible/modules/monitoring/zabbix/zabbix_screen.py:453:16: undefined-variable: Undefined variable 'self'

click here for bot help

@ansibot ansibot added the ci_verified label Feb 14, 2020
@akiko-amino akiko-amino force-pushed the akiko-amino:patch-1 branch 2 times, most recently from d2cbe5e to 7bfe111 Feb 14, 2020
@ansibot ansibot removed the ci_verified label Feb 14, 2020
@ansibot

This comment has been minimized.

Copy link
Contributor

ansibot commented Feb 14, 2020

The test ansible-test sanity --test validate-modules [explain] failed with 40 errors:

lib/ansible/modules/monitoring/zabbix/zabbix_screen.py:0:0: doc-choices-do-not-match-spec: Argument 'state' in argument_spec found in screens defines choices as (['absent', 'present']) but documentation defines choices as ([])
lib/ansible/modules/monitoring/zabbix/zabbix_screen.py:0:0: doc-default-does-not-match-spec: Argument 'graphs_in_row' in argument_spec found in screens defines default as (3) but documentation defines default as (None)
lib/ansible/modules/monitoring/zabbix/zabbix_screen.py:0:0: doc-default-does-not-match-spec: Argument 'state' in argument_spec found in screens defines default as ('present') but documentation defines default as (None)
lib/ansible/modules/monitoring/zabbix/zabbix_screen.py:0:0: doc-default-does-not-match-spec: Argument 'timeout' in argument_spec defines default as (10) but documentation defines default as (None)
lib/ansible/modules/monitoring/zabbix/zabbix_screen.py:0:0: doc-default-does-not-match-spec: Argument 'validate_certs' in argument_spec defines default as (True) but documentation defines default as (False)
lib/ansible/modules/monitoring/zabbix/zabbix_screen.py:0:0: doc-elements-mismatch: Argument 'graph_names' in argument_spec found in screens specifies elements as str,but elements is not documented
lib/ansible/modules/monitoring/zabbix/zabbix_screen.py:0:0: doc-elements-mismatch: Argument 'screens' in argument_spec specifies elements as dict,but elements is not documented
lib/ansible/modules/monitoring/zabbix/zabbix_screen.py:0:0: doc-required-mismatch: Argument 'login_password' in argument_spec is required, but is not documented as being required
lib/ansible/modules/monitoring/zabbix/zabbix_screen.py:0:0: doc-required-mismatch: Argument 'login_user' in argument_spec is required, but is not documented as being required
lib/ansible/modules/monitoring/zabbix/zabbix_screen.py:0:0: doc-required-mismatch: Argument 'screen_name' in argument_spec found in screens is required, but is not documented as being required
lib/ansible/modules/monitoring/zabbix/zabbix_screen.py:0:0: doc-required-mismatch: Argument 'screens' in argument_spec is required, but is not documented as being required
lib/ansible/modules/monitoring/zabbix/zabbix_screen.py:0:0: doc-required-mismatch: Argument 'server_url' in argument_spec is required, but is not documented as being required
lib/ansible/modules/monitoring/zabbix/zabbix_screen.py:0:0: missing-suboption-docs: Argument 'screens' in argument_spec has sub-options but documentation does not define it
lib/ansible/modules/monitoring/zabbix/zabbix_screen.py:0:0: parameter-list-no-elements: Argument 'host_group' in argument_spec found in screens defines type as list but elements is not defined
lib/ansible/modules/monitoring/zabbix/zabbix_screen.py:0:0: parameter-type-not-in-doc: Argument 'graph_height' in argument_spec found in screens defines type as 'int' but documentation doesn't define type
lib/ansible/modules/monitoring/zabbix/zabbix_screen.py:0:0: parameter-type-not-in-doc: Argument 'graph_names' in argument_spec found in screens defines type as 'list' but documentation doesn't define type
lib/ansible/modules/monitoring/zabbix/zabbix_screen.py:0:0: parameter-type-not-in-doc: Argument 'graph_width' in argument_spec found in screens defines type as 'int' but documentation doesn't define type
lib/ansible/modules/monitoring/zabbix/zabbix_screen.py:0:0: parameter-type-not-in-doc: Argument 'graphs_in_row' in argument_spec found in screens defines type as 'int' but documentation doesn't define type
lib/ansible/modules/monitoring/zabbix/zabbix_screen.py:0:0: parameter-type-not-in-doc: Argument 'host_group' in argument_spec found in screens defines type as 'list' but documentation doesn't define type
lib/ansible/modules/monitoring/zabbix/zabbix_screen.py:0:0: parameter-type-not-in-doc: Argument 'http_login_password' in argument_spec defines type as 'str' but documentation doesn't define type
lib/ansible/modules/monitoring/zabbix/zabbix_screen.py:0:0: parameter-type-not-in-doc: Argument 'http_login_user' in argument_spec defines type as 'str' but documentation doesn't define type
lib/ansible/modules/monitoring/zabbix/zabbix_screen.py:0:0: parameter-type-not-in-doc: Argument 'login_password' in argument_spec defines type as 'str' but documentation doesn't define type
lib/ansible/modules/monitoring/zabbix/zabbix_screen.py:0:0: parameter-type-not-in-doc: Argument 'login_user' in argument_spec defines type as 'str' but documentation doesn't define type
lib/ansible/modules/monitoring/zabbix/zabbix_screen.py:0:0: parameter-type-not-in-doc: Argument 'screen_name' in argument_spec found in screens defines type as 'str' but documentation doesn't define type
lib/ansible/modules/monitoring/zabbix/zabbix_screen.py:0:0: parameter-type-not-in-doc: Argument 'screens' in argument_spec defines type as 'list' but documentation doesn't define type
lib/ansible/modules/monitoring/zabbix/zabbix_screen.py:0:0: parameter-type-not-in-doc: Argument 'server_url' in argument_spec defines type as 'str' but documentation doesn't define type
lib/ansible/modules/monitoring/zabbix/zabbix_screen.py:0:0: parameter-type-not-in-doc: Argument 'sort' in argument_spec found in screens defines type as 'bool' but documentation doesn't define type
lib/ansible/modules/monitoring/zabbix/zabbix_screen.py:0:0: parameter-type-not-in-doc: Argument 'state' in argument_spec found in screens defines type as 'str' but documentation doesn't define type
lib/ansible/modules/monitoring/zabbix/zabbix_screen.py:0:0: parameter-type-not-in-doc: Argument 'timeout' in argument_spec defines type as 'int' but documentation doesn't define type
lib/ansible/modules/monitoring/zabbix/zabbix_screen.py:0:0: parameter-type-not-in-doc: Argument 'validate_certs' in argument_spec defines type as 'bool' but documentation doesn't define type
lib/ansible/modules/monitoring/zabbix/zabbix_screen.py:0:0: undocumented-parameter: Argument 'graph_height' found in screens is listed in the argument_spec, but not documented in the module documentation
lib/ansible/modules/monitoring/zabbix/zabbix_screen.py:0:0: undocumented-parameter: Argument 'graph_names' found in screens is listed in the argument_spec, but not documented in the module documentation
lib/ansible/modules/monitoring/zabbix/zabbix_screen.py:0:0: undocumented-parameter: Argument 'graph_width' found in screens is listed in the argument_spec, but not documented in the module documentation
lib/ansible/modules/monitoring/zabbix/zabbix_screen.py:0:0: undocumented-parameter: Argument 'graphs_in_row' found in screens is listed in the argument_spec, but not documented in the module documentation
lib/ansible/modules/monitoring/zabbix/zabbix_screen.py:0:0: undocumented-parameter: Argument 'host_group' found in screens is listed in the argument_spec, but not documented in the module documentation
lib/ansible/modules/monitoring/zabbix/zabbix_screen.py:0:0: undocumented-parameter: Argument 'host_groups' found in screens is listed in the argument_spec, but not documented in the module documentation
lib/ansible/modules/monitoring/zabbix/zabbix_screen.py:0:0: undocumented-parameter: Argument 'screen_name' found in screens is listed in the argument_spec, but not documented in the module documentation
lib/ansible/modules/monitoring/zabbix/zabbix_screen.py:0:0: undocumented-parameter: Argument 'sort' found in screens is listed in the argument_spec, but not documented in the module documentation
lib/ansible/modules/monitoring/zabbix/zabbix_screen.py:0:0: undocumented-parameter: Argument 'state' found in screens is listed in the argument_spec, but not documented in the module documentation
lib/ansible/modules/monitoring/zabbix/zabbix_screen.py:51:13: documentation-syntax-error: DOCUMENTATION is not valid YAML

The test ansible-test sanity --test ansible-doc [explain] failed with the error:

Command "ansible-doc -t module zabbix_screen" returned exit status 1.
>>> Standard Error
ERROR! module zabbix_screen missing documentation (or could not parse documentation): while parsing a flow sequence
  in "<unicode string>", line 35, column 30
did not find expected ',' or ']'
  in "<unicode string>", line 36, column 13

The test ansible-test sanity --test docs-build [explain] failed with the error:

Command "/usr/bin/python3.6 /root/ansible/test/sanity/code-smell/docs-build.py" returned exit status 1.
>>> Standard Error
Command 'make singlehtmldocs' failed with status code: 2
--> Standard Output
PYTHONPATH=../../lib ../../hacking/build-ansible.py collection-meta --template-file=../templates/collections_galaxy_meta.rst.j2 --output-dir=rst/dev_guide/ ../../lib/ansible/galaxy/data/collections_galaxy_meta.yml
PYTHONPATH=../../lib ../../hacking/build-ansible.py document-config --template-file=../templates/config.rst.j2 --output-dir=rst/reference_appendices/ ../../lib/ansible/config/base.yml
mkdir -p rst/cli
PYTHONPATH=../../lib ../../hacking/build-ansible.py generate-man --template-file=../templates/cli_rst.j2 --output-dir=rst/cli/ --output-format rst ../../lib/ansible/cli/*.py
PYTHONPATH=../../lib ../../hacking/build-ansible.py document-keywords --template-dir=../templates --output-dir=rst/reference_appendices/ ./keyword_desc.yml
PYTHONPATH=../../lib ../../hacking/build-ansible.py document-plugins -t rst --template-dir=../templates --module-dir=../../lib/ansible/modules -o rst/modules/ 
Evaluating module files...
Makefile:99: recipe for target 'modules' failed
--> Standard Error
Traceback (most recent call last):
  File "../../hacking/build-ansible.py", line 92, in <module>
    main()
  File "../../hacking/build-ansible.py", line 81, in main
    retval = command.main(args)
  File "/root/ansible/hacking/build_library/build_ansible/command_plugins/plugin_formatter.py", line 747, in main
    plugin_info, categories = get_plugin_info(args.module_dir, limit_to=args.limit_to, verbose=(args.verbosity > 0))
  File "/root/ansible/hacking/build_library/build_ansible/command_plugins/plugin_formatter.py", line 225, in get_plugin_info
    doc, examples, returndocs, metadata = plugin_docs.get_docstring(module_path, fragment_loader, verbose=verbose)
  File "/root/ansible/lib/ansible/utils/plugin_docs.py", line 124, in get_docstring
    data = read_docstring(filename, verbose=verbose, ignore_errors=ignore_errors)
  File "/root/ansible/lib/ansible/parsing/plugin_docs.py", line 59, in read_docstring
    data[varkey] = AnsibleLoader(child.value.s, file_name=filename).get_single_data()
  File "/usr/local/lib/python3.6/dist-packages/yaml/constructor.py", line 41, in get_single_data
    node = self.get_single_node()
  File "ext/_yaml.pyx", line 707, in _yaml.CParser.get_single_node
  File "ext/_yaml.pyx", line 725, in _yaml.CParser._compose_document
  File "ext/_yaml.pyx", line 776, in _yaml.CParser._compose_node
  File "ext/_yaml.pyx", line 890, in _yaml.CParser._compose_mapping_node
  File "ext/_yaml.pyx", line 776, in _yaml.CParser._compose_node
  File "ext/_yaml.pyx", line 890, in _yaml.CParser._compose_mapping_node
  File "ext/_yaml.pyx", line 776, in _yaml.CParser._compose_node
  File "ext/_yaml.pyx", line 890, in _yaml.CParser._compose_mapping_node
  File "ext/_yaml.pyx", line 776, in _yaml.CParser._compose_node
  File "ext/_yaml.pyx", line 890, in _yaml.CParser._compose_mapping_node
  File "ext/_yaml.pyx", line 776, in _yaml.CParser._compose_node
  File "ext/_yaml.pyx", line 890, in _yaml.CParser._compose_mapping_node
  File "ext/_yaml.pyx", line 774, in _yaml.CParser._compose_node
  File "ext/_yaml.pyx", line 853, in _yaml.CParser._compose_sequence_node
  File "ext/_yaml.pyx", line 905, in _yaml.CParser._parse_next_event
yaml.parser.ParserError: while parsing a flow sequence
  in "<unicode string>", line 35, column 30
did not find expected ',' or ']'
  in "<unicode string>", line 36, column 13
make: *** [modules] Error 1

The test ansible-test sanity --test package-data [explain] failed with the error:

Command "/usr/bin/python3.6 /root/ansible/test/sanity/code-smell/package-data.py" returned exit status 1.
>>> Standard Error
Traceback (most recent call last):
  File "/root/ansible/test/sanity/code-smell/package-data.py", line 383, in <module>
    main()
  File "/root/ansible/test/sanity/code-smell/package-data.py", line 360, in main
    sdist_path = create_sdist(tmp_dir)
  File "/root/ansible/test/sanity/code-smell/package-data.py", line 174, in create_sdist
    raise Exception('make snapshot failed:\n%s' % stderr)
Exception: make snapshot failed:
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
ERROR! module zabbix_screen at /tmp/tmphge6grjp/lib/ansible/modules/monitoring/zabbix/zabbix_screen.py has a documentation error formatting or is missing documentation.
Traceback (most recent call last):
  File "packaging/release/changelogs/changelog.py", line 835, in <module>
    main()
  File "packaging/release/changelogs/changelog.py", line 102, in main
    args.func(args)
  File "packaging/release/changelogs/changelog.py", line 132, in command_release
    plugins = load_plugins(version=version, force_reload=reload_plugins)
  File "packaging/release/changelogs/changelog.py", line 184, in load_plugins
    '--json', '--metadata-dump', '-t', plugin_type])
  File "/usr/lib/python3.6/subprocess.py", line 356, in check_output
    **kwargs).stdout
  File "/usr/lib/python3.6/subprocess.py", line 438, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/tmp/tmphge6grjp/bin/ansible-doc', '--json', '--metadata-dump', '-t', 'module']' returned non-zero exit status 1.
make: *** [changelog] Error 1

The test ansible-test sanity --test yamllint [explain] failed with 2 errors:

lib/ansible/modules/monitoring/zabbix/zabbix_screen.py:35:13: unparsable-with-libyaml: while parsing a flow sequence - did not find expected ',' or ']'
lib/ansible/modules/monitoring/zabbix/zabbix_screen.py:51:13: error: DOCUMENTATION: syntax error: expected ',' or ']', but got '<scalar>'

click here for bot help

Allow host search/filter to be done using multiple groups.
Will give hosts that has link to all the given groups.

- Docs Pull Request

+label: docsite_pr
@akiko-amino akiko-amino force-pushed the akiko-amino:patch-1 branch from 7bfe111 to 8d17b16 Feb 14, 2020
@ansibot

This comment has been minimized.

Copy link
Contributor

ansibot commented Feb 14, 2020

The test ansible-test sanity --test validate-modules [explain] failed with 1 error:

lib/ansible/modules/monitoring/zabbix/zabbix_screen.py:0:0: parameter-list-no-elements: Argument 'host_group' in argument_spec found in screens defines type as list but elements is not defined

click here for bot help

@ansibot ansibot added the ci_verified label Feb 14, 2020
- Required if I(state=present).
type: str
type: list

This comment has been minimized.

Copy link
@D3DeFi

D3DeFi Feb 18, 2020

Contributor

This should fix the last error that you are getting:

Suggested change
type: list
type: list
elements: str
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants
You can’t perform that action at this time.