bmhughes

bmhughes

Member Since 5 years ago

UK

Experience Points
1
follower
Lessons Completed
0
follow
Lessons Completed
31
stars
Best Reply Awards
32
repos

775 contributions in the last year

Pinned
⚡ RubyGem for the control of and data retrieval from TP-Link HS100/110 Smartplugs
⚡ Ruby script for retrieving data from a HS100/110 smartplug in InfluxDB line format
⚡ User SSH key and known host cookbook
Activity
Jan
10
6 days ago
Activity icon
issue

bmhughes issue comment chef/chef-workstation

bmhughes
bmhughes

Current Chef RPM packages conflict with chef-workstation

Description

Since circa 17.4 trying to upgrade chef on a host with workstation also instaleld will fail with a file conflict.

I original posted this against omnibus but it's hasn't been picked up so it's probably in the wrong place.

Error: Transaction test error:
  file /usr/lib/.build-id/ff/ed13d7b76a61d3dbc3744d5f4557d1dfca2ed3 from install of chef-17.4.38-1.el8.x86_64 conflicts with file from package chef-workstation-21.9.613-1.el8.x86_64

Omnibus Version

Tell us which version of Omnibus you are using

Platform Version

  • CentOS 7/8
  • Fedora 34
bmhughes
bmhughes

Yes the last couple of releases have co-existed without issue for me.

Jan
8
1 week ago
Activity icon
issue

bmhughes issue comment sous-chefs/openssh

bmhughes
bmhughes

Fix Match orderings

Signed-off-by: Matthew M [email protected]

Description

This removes the sorting applied to the match objects in sshd_config. The ordering of these objects are important as it defines the order of which certain rules are applied to users. By having the sort in the template, the ordering specified by the attributes can get removed.

Issues Resolved

Not aware of any issues it resolves

Check List

  • A summary of changes made is included in the CHANGELOG under ## Unreleased
  • New functionality includes testing.
  • New functionality has been documented in the README if applicable.
bmhughes
bmhughes

One problem with just dropping the sort it that if node attributes are build from various roles/cookbooks then the ordering is unpredicatable, it would be better to do the sort and use a numerical prefix in implementation for reliable statement ordering. Then the prefix can be removed with .delete_prefix in the template.

Jan
4
1 week ago
push

bmhughes push sous-chefs/isc_kea

bmhughes
bmhughes
bmhughes
bmhughes

Use property value map method from chef_auto_accumulator

bmhughes
bmhughes

Add reservation client-class support

commit sha: 15fa304d56c562ce29e052a01da315e3a30c36d2

push time in 1 week ago
Activity icon
created tag
createdAt 1 week ago
Jan
3
1 week ago
Activity icon
issue

bmhughes issue comment netbox-community/netbox

bmhughes
bmhughes

ValueError: 'role' does not resolve to an item that supports prefetching error when selecting Prefix -> IP Addresses

NetBox version

v3.1.4

Python version

3.9

Steps to Reproduce

  1. Upgrade to 3.1.4
  2. Open an IPAM prefix.
  3. Select the IP address tab.
  4. Traceback is observed.

Expected Behavior

The prefix IP address page should have been rendered.

Observed Behavior

A server error is returned with the following traceback.

Traceback (most recent call last):
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner
    response = get_response(request)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/core/handlers/base.py", line 181, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/views/generic/base.py", line 70, in view
    return self.dispatch(request, *args, **kwargs)
  File "/opt/netbox/netbox/utilities/views.py", line 93, in dispatch
    return super().dispatch(request, *args, **kwargs)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/views/generic/base.py", line 98, in dispatch
    return handler(request, *args, **kwargs)
  File "/opt/netbox/netbox/netbox/views/generic.py", line 124, in get
    table = self.table(self.prep_table_data(request, child_objects, instance), user=request.user)
  File "/opt/netbox/netbox/ipam/views.py", line 515, in prep_table_data
    return add_available_ipaddresses(parent.prefix, queryset, parent.is_pool)
  File "/opt/netbox/netbox/ipam/utils.py", line 54, in add_available_ipaddresses
    if not ipaddress_list:
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/db/models/query.py", line 284, in __bool__
    self._fetch_all()
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/db/models/query.py", line 1326, in _fetch_all
    self._prefetch_related_objects()
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/db/models/query.py", line 813, in _prefetch_related_objects
    prefetch_related_objects(self._result_cache, *self._prefetch_related_lookups)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/db/models/query.py", line 1721, in prefetch_related_objects
    raise ValueError("'%s' does not resolve to an item that supports "
ValueError: 'role' does not resolve to an item that supports prefetching - this is an invalid parameter to prefetch_related().
bmhughes
bmhughes

FYI this is not related to #8196, it just had not been reported.

Apologies, bad wording on my part there

push

bmhughes push sous-chefs/chef_auto_accumulator

bmhughes
bmhughes
bmhughes
bmhughes

Move resource property map generator into library method

bmhughes
bmhughes

Move supporting gems to constant and install via each

bmhughes
bmhughes

Refactor resource_config_path

commit sha: 1bf25a2be87a3bdd6dbb18c1a73d167651d91239

push time in 1 week ago
Activity icon
issue

bmhughes issue comment netbox-community/netbox

bmhughes
bmhughes

ValueError: 'role' does not resolve to an item that supports prefetching error when selecting Prefix -> IP Addresses

NetBox version

v3.1.4

Python version

3.9

Steps to Reproduce

  1. Upgrade to 3.1.4
  2. Open an IPAM prefix.
  3. Select the IP address tab.
  4. Traceback is observed.

Expected Behavior

The prefix IP address page should have been rendered.

Observed Behavior

A server error is returned with the following traceback.

Traceback (most recent call last):
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner
    response = get_response(request)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/core/handlers/base.py", line 181, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/views/generic/base.py", line 70, in view
    return self.dispatch(request, *args, **kwargs)
  File "/opt/netbox/netbox/utilities/views.py", line 93, in dispatch
    return super().dispatch(request, *args, **kwargs)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/views/generic/base.py", line 98, in dispatch
    return handler(request, *args, **kwargs)
  File "/opt/netbox/netbox/netbox/views/generic.py", line 124, in get
    table = self.table(self.prep_table_data(request, child_objects, instance), user=request.user)
  File "/opt/netbox/netbox/ipam/views.py", line 515, in prep_table_data
    return add_available_ipaddresses(parent.prefix, queryset, parent.is_pool)
  File "/opt/netbox/netbox/ipam/utils.py", line 54, in add_available_ipaddresses
    if not ipaddress_list:
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/db/models/query.py", line 284, in __bool__
    self._fetch_all()
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/db/models/query.py", line 1326, in _fetch_all
    self._prefetch_related_objects()
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/db/models/query.py", line 813, in _prefetch_related_objects
    prefetch_related_objects(self._result_cache, *self._prefetch_related_lookups)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/db/models/query.py", line 1721, in prefetch_related_objects
    raise ValueError("'%s' does not resolve to an item that supports "
ValueError: 'role' does not resolve to an item that supports prefetching - this is an invalid parameter to prefetch_related().
bmhughes
bmhughes

Ran into this after upgrading to 3.1.4 to fix #8196 as unfortunately another bug has been introduced.

Activity icon
issue

bmhughes issue netbox-community/netbox

bmhughes
bmhughes

ValueError: 'role' does not resolve to an item that supports prefetching error when selecting Prefix -> IP Addresses

NetBox version

v3.1.4

Python version

3.9

Steps to Reproduce

  1. Upgrade to 3.1.4
  2. Open an IPAM prefix.
  3. Select the IP address tab.
  4. Traceback is observed.

Expected Behavior

The prefix IP address page should have been rendered.

Observed Behavior

A server error is returned with the following traceback.

Traceback (most recent call last):
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner
    response = get_response(request)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/core/handlers/base.py", line 181, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/views/generic/base.py", line 70, in view
    return self.dispatch(request, *args, **kwargs)
  File "/opt/netbox/netbox/utilities/views.py", line 93, in dispatch
    return super().dispatch(request, *args, **kwargs)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/views/generic/base.py", line 98, in dispatch
    return handler(request, *args, **kwargs)
  File "/opt/netbox/netbox/netbox/views/generic.py", line 124, in get
    table = self.table(self.prep_table_data(request, child_objects, instance), user=request.user)
  File "/opt/netbox/netbox/ipam/views.py", line 515, in prep_table_data
    return add_available_ipaddresses(parent.prefix, queryset, parent.is_pool)
  File "/opt/netbox/netbox/ipam/utils.py", line 54, in add_available_ipaddresses
    if not ipaddress_list:
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/db/models/query.py", line 284, in __bool__
    self._fetch_all()
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/db/models/query.py", line 1326, in _fetch_all
    self._prefetch_related_objects()
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/db/models/query.py", line 813, in _prefetch_related_objects
    prefetch_related_objects(self._result_cache, *self._prefetch_related_lookups)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/db/models/query.py", line 1721, in prefetch_related_objects
    raise ValueError("'%s' does not resolve to an item that supports "
ValueError: 'role' does not resolve to an item that supports prefetching - this is an invalid parameter to prefetch_related().
Dec
30
2 weeks ago
Activity icon
issue

bmhughes issue comment netbox-community/netbox

bmhughes
bmhughes

IPv6 prefixes fail to display with IndexError error on 3.1.3

NetBox version

v3.1.3

Python version

3.9

Steps to Reproduce

  1. Open a previously defined IPv6 prefix

Expected Behavior

Display the prefix data

Observed Behavior

IndexError at /ipam/prefixes/271/
range contains more than 9223372036854775807 (sys.maxint) IP addresses!Use the .size property instead.
Environment:


Request Method: GET
Request URL: http://netbox/ipam/prefixes/271/

Django Version: 3.2.10
Python Version: 3.9.7
Installed Applications:
['django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'django.contrib.humanize',
 'corsheaders',
 'debug_toolbar',
 'graphiql_debug_toolbar',
 'django_filters',
 'django_tables2',
 'django_prometheus',
 'graphene_django',
 'mptt',
 'rest_framework',
 'social_django',
 'taggit',
 'timezone_field',
 'circuits',
 'dcim',
 'ipam',
 'extras',
 'tenancy',
 'users',
 'utilities',
 'virtualization',
 'wireless',
 'django_rq',
 'drf_yasg',
 'django3_saml2_nbplugin.Django3AuthSAML2Plugin']
Installed Middleware:
['graphiql_debug_toolbar.middleware.DebugToolbarMiddleware',
 'django_prometheus.middleware.PrometheusBeforeMiddleware',
 'corsheaders.middleware.CorsMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware',
 'django.middleware.security.SecurityMiddleware',
 'netbox.middleware.ExceptionHandlingMiddleware',
 'netbox.middleware.RemoteUserMiddleware',
 'netbox.middleware.LoginRequiredMiddleware',
 'netbox.middleware.DynamicConfigMiddleware',
 'netbox.middleware.APIVersionMiddleware',
 'netbox.middleware.ObjectChangeMiddleware',
 'django_prometheus.middleware.PrometheusAfterMiddleware']


Template error:
In template /opt/netbox/netbox/templates/base/base.html, error at line 0
   range contains more than 9223372036854775807 (sys.maxint) IP addresses!Use the .size property instead.
   1 : {# Base template for (almost) all NetBox pages #}
   2 : {% load static %}
   3 : {% load helpers %}
   4 : <!DOCTYPE html>
   5 : <html
   6 :   lang="en"
   7 :   data-netbox-url-name="{{ request.resolver_match.url_name }}"
   8 :   data-netbox-base-path="{{ settings.BASE_PATH }}"
   9 :   {% with preferences|get_key:'ui.colormode' as color_mode %}
   10 :     {% if color_mode == 'dark'%}


Traceback (most recent call last):
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner
    response = get_response(request)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/core/handlers/base.py", line 181, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/views/generic/base.py", line 70, in view
    return self.dispatch(request, *args, **kwargs)
  File "/opt/netbox/netbox/utilities/views.py", line 93, in dispatch
    return super().dispatch(request, *args, **kwargs)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/views/generic/base.py", line 98, in dispatch
    return handler(request, *args, **kwargs)
  File "/opt/netbox/netbox/netbox/views/generic.py", line 70, in get
    return render(request, self.get_template_name(), {
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/shortcuts.py", line 19, in render
    content = loader.render_to_string(template_name, context, request, using=using)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/template/loader.py", line 62, in render_to_string
    return template.render(context, request)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/template/backends/django.py", line 61, in render
    return self.template.render(context)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/template/base.py", line 170, in render
    return self._render(context)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/test/utils.py", line 100, in instrumented_test_render
    return self.nodelist.render(context)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/template/base.py", line 938, in render
    bit = node.render_annotated(context)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/template/base.py", line 905, in render_annotated
    return self.render(context)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/template/loader_tags.py", line 150, in render
    return compiled_parent._render(context)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/test/utils.py", line 100, in instrumented_test_render
    return self.nodelist.render(context)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/template/base.py", line 938, in render
    bit = node.render_annotated(context)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/template/base.py", line 905, in render_annotated
    return self.render(context)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/template/loader_tags.py", line 150, in render
    return compiled_parent._render(context)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/test/utils.py", line 100, in instrumented_test_render
    return self.nodelist.render(context)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/template/base.py", line 938, in render
    bit = node.render_annotated(context)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/template/base.py", line 905, in render_annotated
    return self.render(context)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/template/loader_tags.py", line 150, in render
    return compiled_parent._render(context)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/test/utils.py", line 100, in instrumented_test_render
    return self.nodelist.render(context)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/template/base.py", line 938, in render
    bit = node.render_annotated(context)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/template/base.py", line 905, in render_annotated
    return self.render(context)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/template/loader_tags.py", line 150, in render
    return compiled_parent._render(context)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/test/utils.py", line 100, in instrumented_test_render
    return self.nodelist.render(context)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/template/base.py", line 938, in render
    bit = node.render_annotated(context)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/template/base.py", line 905, in render_annotated
    return self.render(context)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/template/loader_tags.py", line 62, in render
    result = block.nodelist.render(context)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/template/base.py", line 938, in render
    bit = node.render_annotated(context)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/template/base.py", line 905, in render_annotated
    return self.render(context)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/template/loader_tags.py", line 62, in render
    result = block.nodelist.render(context)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/template/base.py", line 938, in render
    bit = node.render_annotated(context)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/template/base.py", line 905, in render_annotated
    return self.render(context)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/template/loader_tags.py", line 62, in render
    result = block.nodelist.render(context)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/template/base.py", line 938, in render
    bit = node.render_annotated(context)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/template/base.py", line 905, in render_annotated
    return self.render(context)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/template/defaulttags.py", line 516, in render
    return self.nodelist.render(context)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/template/base.py", line 938, in render
    bit = node.render_annotated(context)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/template/base.py", line 905, in render_annotated
    return self.render(context)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/template/base.py", line 988, in render
    output = self.filter_expression.resolve(context)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/template/base.py", line 698, in resolve
    new_obj = func(obj, *arg_vals)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/template/defaultfilters.py", line 565, in length
    return len(value)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/netaddr/ip/sets.py", line 685, in __len__
    raise IndexError(

Exception Type: IndexError at /ipam/prefixes/271/
Exception Value: range contains more than 9223372036854775807 (sys.maxint) IP addresses!Use the .size property instead.
bmhughes
bmhughes

I'm not really sure what else I can provide here to give more detail, it (for me at least) trivial to reproduce.

  1. Have a working v3.1.2 install.
  2. Upgrade it to v3.1.3.
  3. Unable to edit IPv6 prefixes due to the address length overflowing the max integer size.

I'd guess it's due to the new address overview panel but I've had to roll back to 3.1.2 so it's only a guess.

Activity icon
issue

bmhughes issue netbox-community/netbox

bmhughes
bmhughes

IPv6 prefixes fail to display with IndexError error on 3.1.3

NetBox version

v3.1.3

Python version

3.9

Steps to Reproduce

  1. Open a previously defined IPv6 prefix

Expected Behavior

Display the prefix data

Observed Behavior

IndexError at /ipam/prefixes/271/
range contains more than 9223372036854775807 (sys.maxint) IP addresses!Use the .size property instead.
Environment:


Request Method: GET
Request URL: http://netbox/ipam/prefixes/271/

Django Version: 3.2.10
Python Version: 3.9.7
Installed Applications:
['django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'django.contrib.humanize',
 'corsheaders',
 'debug_toolbar',
 'graphiql_debug_toolbar',
 'django_filters',
 'django_tables2',
 'django_prometheus',
 'graphene_django',
 'mptt',
 'rest_framework',
 'social_django',
 'taggit',
 'timezone_field',
 'circuits',
 'dcim',
 'ipam',
 'extras',
 'tenancy',
 'users',
 'utilities',
 'virtualization',
 'wireless',
 'django_rq',
 'drf_yasg',
 'django3_saml2_nbplugin.Django3AuthSAML2Plugin']
Installed Middleware:
['graphiql_debug_toolbar.middleware.DebugToolbarMiddleware',
 'django_prometheus.middleware.PrometheusBeforeMiddleware',
 'corsheaders.middleware.CorsMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware',
 'django.middleware.security.SecurityMiddleware',
 'netbox.middleware.ExceptionHandlingMiddleware',
 'netbox.middleware.RemoteUserMiddleware',
 'netbox.middleware.LoginRequiredMiddleware',
 'netbox.middleware.DynamicConfigMiddleware',
 'netbox.middleware.APIVersionMiddleware',
 'netbox.middleware.ObjectChangeMiddleware',
 'django_prometheus.middleware.PrometheusAfterMiddleware']


Template error:
In template /opt/netbox/netbox/templates/base/base.html, error at line 0
   range contains more than 9223372036854775807 (sys.maxint) IP addresses!Use the .size property instead.
   1 : {# Base template for (almost) all NetBox pages #}
   2 : {% load static %}
   3 : {% load helpers %}
   4 : <!DOCTYPE html>
   5 : <html
   6 :   lang="en"
   7 :   data-netbox-url-name="{{ request.resolver_match.url_name }}"
   8 :   data-netbox-base-path="{{ settings.BASE_PATH }}"
   9 :   {% with preferences|get_key:'ui.colormode' as color_mode %}
   10 :     {% if color_mode == 'dark'%}


Traceback (most recent call last):
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/core/handlers/exception.py", line 47, in inner
    response = get_response(request)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/core/handlers/base.py", line 181, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/views/generic/base.py", line 70, in view
    return self.dispatch(request, *args, **kwargs)
  File "/opt/netbox/netbox/utilities/views.py", line 93, in dispatch
    return super().dispatch(request, *args, **kwargs)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/views/generic/base.py", line 98, in dispatch
    return handler(request, *args, **kwargs)
  File "/opt/netbox/netbox/netbox/views/generic.py", line 70, in get
    return render(request, self.get_template_name(), {
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/shortcuts.py", line 19, in render
    content = loader.render_to_string(template_name, context, request, using=using)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/template/loader.py", line 62, in render_to_string
    return template.render(context, request)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/template/backends/django.py", line 61, in render
    return self.template.render(context)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/template/base.py", line 170, in render
    return self._render(context)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/test/utils.py", line 100, in instrumented_test_render
    return self.nodelist.render(context)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/template/base.py", line 938, in render
    bit = node.render_annotated(context)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/template/base.py", line 905, in render_annotated
    return self.render(context)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/template/loader_tags.py", line 150, in render
    return compiled_parent._render(context)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/test/utils.py", line 100, in instrumented_test_render
    return self.nodelist.render(context)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/template/base.py", line 938, in render
    bit = node.render_annotated(context)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/template/base.py", line 905, in render_annotated
    return self.render(context)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/template/loader_tags.py", line 150, in render
    return compiled_parent._render(context)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/test/utils.py", line 100, in instrumented_test_render
    return self.nodelist.render(context)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/template/base.py", line 938, in render
    bit = node.render_annotated(context)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/template/base.py", line 905, in render_annotated
    return self.render(context)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/template/loader_tags.py", line 150, in render
    return compiled_parent._render(context)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/test/utils.py", line 100, in instrumented_test_render
    return self.nodelist.render(context)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/template/base.py", line 938, in render
    bit = node.render_annotated(context)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/template/base.py", line 905, in render_annotated
    return self.render(context)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/template/loader_tags.py", line 150, in render
    return compiled_parent._render(context)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/test/utils.py", line 100, in instrumented_test_render
    return self.nodelist.render(context)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/template/base.py", line 938, in render
    bit = node.render_annotated(context)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/template/base.py", line 905, in render_annotated
    return self.render(context)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/template/loader_tags.py", line 62, in render
    result = block.nodelist.render(context)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/template/base.py", line 938, in render
    bit = node.render_annotated(context)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/template/base.py", line 905, in render_annotated
    return self.render(context)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/template/loader_tags.py", line 62, in render
    result = block.nodelist.render(context)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/template/base.py", line 938, in render
    bit = node.render_annotated(context)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/template/base.py", line 905, in render_annotated
    return self.render(context)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/template/loader_tags.py", line 62, in render
    result = block.nodelist.render(context)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/template/base.py", line 938, in render
    bit = node.render_annotated(context)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/template/base.py", line 905, in render_annotated
    return self.render(context)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/template/defaulttags.py", line 516, in render
    return self.nodelist.render(context)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/template/base.py", line 938, in render
    bit = node.render_annotated(context)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/template/base.py", line 905, in render_annotated
    return self.render(context)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/template/base.py", line 988, in render
    output = self.filter_expression.resolve(context)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/template/base.py", line 698, in resolve
    new_obj = func(obj, *arg_vals)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/django/template/defaultfilters.py", line 565, in length
    return len(value)
  File "/opt/netbox/venv/lib64/python3.9/site-packages/netaddr/ip/sets.py", line 685, in __len__
    raise IndexError(

Exception Type: IndexError at /ipam/prefixes/271/
Exception Value: range contains more than 9223372036854775807 (sys.maxint) IP addresses!Use the .size property instead.
Dec
23
3 weeks ago
push

bmhughes push sous-chefs/isc_kea

bmhughes
bmhughes

Add client class matcht to pool resource

commit sha: cdc8ba6d854c3b5635e01e8c1efeab77d9feddb8

push time in 3 weeks ago
Activity icon
issue

bmhughes issue comment smutel/terraform-provider-netbox

bmhughes
bmhughes

fix: Store empty static String field as nil in TF state

The 'static' String fields (description/dns_name) when empty are returned via the Netbox API as an empty String "" but they cannot be cleared by POST/PATCH-ing an emptry String or null value. They are cleared by setting a single whitespace character " ", before this change these empty fields were always stored in the TF state as an existent resource property even though they were unset. This also resulted in these whitespace values being sent to Netbox every time a resource was created/updated.

This change stores unset fields as nil and sets the default values of the description and dns_name property to nil. Empty String fields are stored as nil when reading from Netbox and nil fields are POST/PATCH-ed to Netbox as the single whitespace String " ". When unset the properties will not be sent in the request body to Netbox and will not show in the TF show command.

bmhughes
bmhughes

I believe I have them all now.

push

bmhughes push bmhughes/terraform-provider-netbox

bmhughes
bmhughes

fix: Store empty static String field as nil in TF state

The 'static' String fields (description/dns_name) when empty are returned via the Netbox API as an empty String "" but they cannot be cleared by POST/PATCH-ing an emptry String or null value. They are cleared by setting a single whitespace character " ", before this change these empty fields were always stored in the TF state as an existent resource property even though they were unset. This also resulted in these whitespace values being sent to Netbox every time a resource was created/updated.

This change stores unset fields as nil and sets the default values of the description and dns_name property to nil. Empty String fields are stored as nil when reading from Netbox and nil fields are POST/PATCH-ed to Netbox as the single whitespace String " ". When unset the properties will not be sent in the request body to Netbox and will not show in the TF show command.

bmhughes
bmhughes

ci: Update Namechee github action

commit sha: 735d8286011ed4bc0773c57a30cde75a35f99aef

push time in 3 weeks ago
Activity icon
issue

bmhughes issue comment smutel/terraform-provider-netbox

bmhughes
bmhughes

fix: Store empty static String field as nil in TF state

The 'static' String fields (description/dns_name) when empty are returned via the Netbox API as an empty String "" but they cannot be cleared by POST/PATCH-ing an emptry String or null value. They are cleared by setting a single whitespace character " ", before this change these empty fields were always stored in the TF state as an existent resource property even though they were unset. This also resulted in these whitespace values being sent to Netbox every time a resource was created/updated.

This change stores unset fields as nil and sets the default values of the description and dns_name property to nil. Empty String fields are stored as nil when reading from Netbox and nil fields are POST/PATCH-ed to Netbox as the single whitespace String " ". When unset the properties will not be sent in the request body to Netbox and will not show in the TF show command.

bmhughes
bmhughes

I only really use the IPAM resources (which are 100% working for me) so must've missed that, let me check it out.

Dec
21
3 weeks ago
Activity icon
issue

bmhughes issue comment sous-chefs/yum-epel

bmhughes
bmhughes

Add support for Rocky Linux

Description

Adds rocky as a platform where EPEL8 repos are installed.

Issues Resolved

N/A

Check List

  • A summary of changes made is included in the CHANGELOG under ## Unreleased
  • New functionality includes testing.
  • New functionality has been documented in the README if applicable.
bmhughes
bmhughes

@ziggythehamster If you can fix the test failure then we can get this merged (only duplicate whitespace by the looks of it)

pull request

bmhughes merge to sous-chefs/yum-remi-chef

bmhughes
bmhughes

Proper DNF module support & resources

Description

The previous PR, #37, missed the modular repo which has the DNF module information. This caused attempted installs on C8 to fail when trying to install php from the remi-phpXX repos, as these try to use module packages but the modules were not present.

This PR adds support for the remi-modular repo, and switches to using the DNF modules instead of the phpXX repos on platforms that support it, in accordance with the upstream recommendations.

Additionally, this PR also adds a matching set of yum_remi_ resources to (eventually) replace the recipes in this cookbook.

Additionally two, Amazon didnt work due to their base repos having priority set. This is fixed here as well.

Marked as major release due to the switch to modules in the recipes.

Issues Resolved

(none)

Check List

  • A summary of changes made is included in the CHANGELOG under ## Unreleased
  • New functionality includes testing.
  • New functionality has been documented in the README if applicable.
open pull request

bmhughes wants to merge sous-chefs/yum-remi-chef

bmhughes
bmhughes

Proper DNF module support & resources

Description

The previous PR, #37, missed the modular repo which has the DNF module information. This caused attempted installs on C8 to fail when trying to install php from the remi-phpXX repos, as these try to use module packages but the modules were not present.

This PR adds support for the remi-modular repo, and switches to using the DNF modules instead of the phpXX repos on platforms that support it, in accordance with the upstream recommendations.

Additionally, this PR also adds a matching set of yum_remi_ resources to (eventually) replace the recipes in this cookbook.

Additionally two, Amazon didnt work due to their base repos having priority set. This is fixed here as well.

Marked as major release due to the switch to modules in the recipes.

Issues Resolved

(none)

Check List

  • A summary of changes made is included in the CHANGELOG under ## Unreleased
  • New functionality includes testing.
  • New functionality has been documented in the README if applicable.
bmhughes
bmhughes

Do these helpers get used in anything other than the custom resources? If so we can remove this an not pollute the main DSL with unnessary helpers and just include in the resource class and action_classes.

push

bmhughes push sous-chefs/yum

bmhughes
bmhughes

Fis version comparison in dnf_module supported check (#197)

Signed-off-by: Robert Detjens [email protected]

commit sha: 829fa6bd26bb9d9c827801d16e45bd03ed40915b

push time in 3 weeks ago
Activity icon
delete

bmhughes in sous-chefs/yum delete branch detjensrobert/module-version

deleted time in 3 weeks ago
pull request

bmhughes pull request sous-chefs/yum

bmhughes
bmhughes

Fix version comparison on platform_version

Description

The supported platform check should be using .to_i instead of comparing to the original string value.

Issues Resolved

(none)

Check List

  • A summary of changes made is included in the CHANGELOG under ## Unreleased
  • New functionality includes testing.
  • New functionality has been documented in the README if applicable.
pull request

bmhughes merge to sous-chefs/yum

bmhughes
bmhughes

Fix version comparison on platform_version

Description

The supported platform check should be using .to_i instead of comparing to the original string value.

Issues Resolved

(none)

Check List

  • A summary of changes made is included in the CHANGELOG under ## Unreleased
  • New functionality includes testing.
  • New functionality has been documented in the README if applicable.
Dec
17
4 weeks ago
Activity icon
issue

bmhughes issue comment hashicorp/terraform-provider-vsphere

bmhughes
bmhughes

Terraform plan/apply tries to change VM replica instead of source VM

Terraform Version

1.1.0

vSphere Provider Version

2.0.2

vSphere Version

7.0.2

Affected Resource(s)

vsphere_virtual_machine

If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this. ---> in this case it affects only VMs who have a replica.

Terraform Configuration Files

# Copy-paste your Terraform configurations here - for large Terraform configs,
# please use a service like Dropbox and share a link to the ZIP file. For
# security, you can also encrypt the files using our GPG public key.

Debug Output

Panic Output

Expected Behavior

We have 2 Datacenters, one for production and the other one for non-prod workloads and replica. When a production VM is initially created, all works fine. By adding a tag to the VM and after pickup of VEEAM, this VM is automatically added as a VEEAM replica to our second datacenter. When we execute a plan or apply, we noticed that now Terraform tries to change the REPLICA VM instead of the source VM. By doing some research we noticed that both VMs have the same VM UUID (both source & replica) and this is as design. Probably Vsphere provider works with this VM UUID but it is not unique within vcenter. MOID should be a better option, I guess...

Actual Behavior

Terraform plan/apply tries to change the replica VM instead of the source VM. terraformplan.

The only dirty workaround that we now implemented is by adding a lifecycle block with ignore_changes = all. That way we prevent a VM to be changed, but that means also that we cannot do changes through Terraform on an existing VM.

Steps to Reproduce

Important Factoids

Apparently a terraform refresh state doesn't take into account the datacenter name or resource pool id and so it tries to manipulate the replicated VM instead of the source VM.

References

Think that https://github.com/hashicorp/terraform-provider-vsphere/issues/1524 is kinda related.

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.
bmhughes
bmhughes

Getting the same problem here in the same situation with the same symptoms.

Dec
16
1 month ago
pull request

bmhughes pull request sous-chefs/docker

bmhughes
bmhughes

Fix generate_json not accepting a variable number of arguments

Description

Fix generate_json not accepting a variable number of arguments

Issues Resolved

  • n/a

Check List

  • A summary of changes made is included in the CHANGELOG under ## Unreleased
  • New functionality includes testing.
  • New functionality has been documented in the README if applicable.
Activity icon
created branch

bmhughes in sous-chefs/docker create branch fix-generate-json-nils

createdAt 1 month ago
Dec
14
1 month ago
push

bmhughes push sous-chefs/isc_kea

bmhughes
bmhughes

Stork 1.0.0 has changed some config key names

commit sha: 0bfdd202614f298fc996fe7773db825793d16ed8

push time in 1 month ago
Previous