The Problem
I have recently been adding EX3400 switches, with wired assurance, into the Mist portal. On many of them, I was getting this error when trying to commit certain changes, such as enabling Dynamic Port Configuration:
error commit-confirm: [edit] apply-groups mist-dpc: mgd: Configuration group ‘mist-dpc’ is not defined
I also found that dynamic port profiles were not being applied at all.
Findings
I found that when these switches were originally adopted into Mist, there were a few things that didn’t happen:
- Group configuration didn’t apply
- The Mist scripts weren’t copied over
You can confirm this by logging on to the CLI of the switch, and running show configuration groups. Under this hierarchy, there should be a mist-dpc and mist-script hierarchy.
Additionally, if you run file list /var/db/scripts/op and file list /var/db/scripts/event, you will find that these directories are empty.
Workaround
I haven’t found a ‘correct’ solution for this yet, only a workaround. I was able to connect to a switch that was working, and copy the config and scripts over to the other switches.
If you don’t have a working switch available, you can use the config and files below.
WARNING: By the time you read this, these files may be out of date. If you’re experiencing the same problem, I recommend trying to find a permanent solution.
Configuration
set groups mist-dpc event-options generate-event timer-every-one-minute time-interval 60
set groups mist-dpc event-options policy dynamic-port-detect events lldp_neighbor_up
set groups mist-dpc event-options policy dynamic-port-detect events snmp_trap_link_up
set groups mist-dpc event-options policy dynamic-port-detect events snmp_trap_link_down
set groups mist-dpc event-options policy dynamic-port-detect events ui_commit_completed
set groups mist-dpc event-options policy dynamic-port-detect events dot1xd_usr_authenticated
set groups mist-dpc event-options policy dynamic-port-detect events get-stats-every-three-minute
set groups mist-dpc event-options policy dynamic-port-detect then event-script mist_dynamic_port_usages.py
set groups mist-dpc event-options policy dynamic-port-commit events timer-every-one-minute
set groups mist-dpc event-options policy dynamic-port-commit then event-script mist_dynamic_port_commit.py
set groups mist-script system scripts op file mist_helper.py arguments cmd
set groups mist-script system scripts op file mist_helper.py checksum sha-256 fffed9f4c538dfee3f98e34302cd30dd2560bd65c9340ff5c3a14cc05f80ec49
set groups mist-script system scripts op file mist_vccmd.py checksum sha-256 b4012cfbaa9ed42b776fa96d016dd9d1036ebe1a5706ede49567db366d5f5e4b
set groups mist-script event-options generate-event get-stats-every-three-minute time-interval 180
set groups mist-script event-options generate-event monitor-diskspace-now time-interval 86400
set groups mist-script event-options generate-event get-perf-probe-stats time-interval 180
set groups mist-script event-options policy log-on-snmp-trap-link events snmp_trap_link_up
set groups mist-script event-options policy log-on-snmp-trap-link events snmp_trap_link_down
set groups mist-script event-options policy log-on-snmp-trap-link then event-script mist_event_dispatcher.py
set groups mist-script event-options policy backup-cfg-after-commit events ui_commit_completed
set groups mist-script event-options policy backup-cfg-after-commit then event-script mist_event_dispatcher.py
set groups mist-script event-options policy log-on-storm-ctrl-in-effect events l2ald_st_ctl_in_effect
set groups mist-script event-options policy log-on-storm-ctrl-in-effect then event-script mist_storm_control_event_logger.py
set groups mist-script event-options policy log-on-system-events events dot1xd_auth_session_deleted
set groups mist-script event-options policy log-on-system-events events dot1xd_rcvd_eaplogof_athntictd
set groups mist-script event-options policy log-on-system-events events dot1xd_usr_access_denied
set groups mist-script event-options policy log-on-system-events events dot1xd_usr_authenticated
set groups mist-script event-options policy log-on-system-events events dot1xd_usr_session_disconnected
set groups mist-script event-options policy log-on-system-events events eswd_stp_state_change_info
set groups mist-script event-options policy log-on-system-events events ui_commit_not_confirmed
set groups mist-script event-options policy log-on-system-events events chassisd_vchassis_member_update_notice
set groups mist-script event-options policy log-on-system-events events chassisd_vchassis_member_list_notice
set groups mist-script event-options policy log-on-system-events events chassisd_vchassis_member_op_notice
set groups mist-script event-options policy log-on-system-events events snmpd_trap_cold_start
set groups mist-script event-options policy log-on-system-events events l2cpd_receive_bpdu_block_enabled
set groups mist-script event-options policy log-on-system-events events chassisd_psu_error
set groups mist-script event-options policy log-on-system-events events chassisd_psu_fan_fail
set groups mist-script event-options policy log-on-system-events events chassisd_psu_input_bad
set groups mist-script event-options policy log-on-system-events events chassisd_psu_overload
set groups mist-script event-options policy log-on-system-events events chassisd_psu_temperature
set groups mist-script event-options policy log-on-system-events events chassisd_psu_voltage
set groups mist-script event-options policy log-on-system-events events jsrpd_ha_control_link_down
set groups mist-script event-options policy log-on-system-events events jsrpd_ha_control_link_up
set groups mist-script event-options policy log-on-system-events events jsrpd_ha_health_weight_low
set groups mist-script event-options policy log-on-system-events events jsrpd_ha_health_weight_recovery
set groups mist-script event-options policy log-on-system-events then event-script mist_event_dispatcher.py
set groups mist-script event-options policy monitor-diskspace-policy events monitor-diskspace-now
set groups mist-script event-options policy monitor-diskspace-policy then event-script mist_monitor_diskspace.py
set groups mist-script event-options policy get-stats-policy events get-stats-every-three-minute
set groups mist-script event-options policy get-stats-policy then event-script mist_event_dispatcher.py
set groups mist-script event-options event-script file mist_event_dispatcher.py python-script-user mist
set groups mist-script event-options event-script file mist_event_dispatcher.py checksum sha-256 982a24151d17173695304e221797c3abd44beb8336d13cf15609f48207dfeffc
set groups mist-script event-options event-script file mist_link_event_logger.py python-script-user mist
set groups mist-script event-options event-script file mist_link_event_logger.py checksum sha-256 0b4df402a20057452cc39f1e8ef9c484aad8fb76a1466564eccc23cd1836e004
set groups mist-script event-options event-script file mist_backup_cfg.py python-script-user mist
set groups mist-script event-options event-script file mist_backup_cfg.py checksum sha-256 2208c79bdbeca7000a860f8c0a6399e8f1d908583bc9cd193ef2ddb8a4cb7a2a
set groups mist-script event-options event-script file mist_storm_control_event_logger.py python-script-user mist
set groups mist-script event-options event-script file mist_storm_control_event_logger.py checksum sha-256 b29a60e7228408d8b8ac53047a324f725e09e9c2ba4b282654f03c3b7ddc882e
set groups mist-script event-options event-script file mist_link_event_capturer.py python-script-user mist
set groups mist-script event-options event-script file mist_link_event_capturer.py checksum sha-256 dd94bcab374a467cab5650053fe41134f5f617c32145849e480f5c142ab56ac5
set groups mist-script event-options event-script file mist_monitor_diskspace.py python-script-user mist
set groups mist-script event-options event-script file mist_monitor_diskspace.py checksum sha-256 f28019ed90f62be64791ec8a06af2b289e34baed49f191ce7f3cd328ffc09630
set groups mist-script event-options event-script file mist_dynamic_port_usages.py python-script-user mist
set groups mist-script event-options event-script file mist_dynamic_port_usages.py checksum sha-256 cd4556c1ffd13ad2a457ab801da0bced0b88745af620119ded480c3cda1fb94a
set groups mist-script event-options event-script file mist_dynamic_port_commit.py python-script-user mist
set groups mist-script event-options event-script file mist_dynamic_port_commit.py checksum sha-256 3c9ef50e2288e4bfa21a06a1a5241dd3aa8abb04fffd27e14fe5342df438dde2
set groups mist-script event-options event-script file mist_event_aggregator.py python-script-user mist
set groups mist-script event-options event-script file mist_event_aggregator.py checksum sha-256 eeb1573724bba2cd50efb9edffebd8a4f77944dc8de74d7a7f81f9cedef9331a
set groups mist-script event-options event-script file mist_collect_stats.py python-script-user mist
set groups mist-script event-options event-script file mist_collect_stats.py checksum sha-256 61253d515a80a2e664e28b3c4eac92dacc3aed16573822e160164ba8b382260f
set groups mist-script event-options event-script file mist_vcsetup_agent.py python-script-user mist
set groups mist-script event-options event-script file mist_vcsetup_agent.py checksum sha-256 f844ac7501828890372059b9b4993d169d4201d3190611337a0eb6abed7b861d
Scripts
Download the Mist Scripts here. Note that the checksums in the config above refer to these scripts. Newer config won’t match older scripts.
The mist_helper.py and mist_vccmd.py need to be in the /var/db/scripts/op directory.
The other 11 scripts belong in the /var/db/scripts/event directory.
Permissions
Next, make the mist user the owner of these scripts:
start shell user root
Password:
root@SWITCH:RE:1% cd /var/db/scripts/event/
root@SWITCH:RE:1% chown mist mist_*
root@SWITCH:RE:1% ls -al
total 216
drwxrws--x 2 root wheel 512 Apr 29 12:23 .
drwxrws--x 10 root wheel 512 Apr 23 13:00 ..
-rw-r--r-- 1 mist wheel 11382 Apr 29 11:13 .dynamic_port_usages.json
-rw-r--r-- 1 mist wheel 5846 Apr 29 12:19 mist_backup_cfg.py
-rw-r--r-- 1 mist wheel 2157 Apr 29 12:19 mist_collect_stats.py
-rw-r--r-- 1 mist wheel 1972 Apr 29 12:20 mist_dynamic_port_commit.py
-rw-r--r-- 1 mist wheel 23632 Apr 29 12:20 mist_dynamic_port_usages.py
-rw-r--r-- 1 mist wheel 1685 Apr 29 12:22 mist_event_aggregator.py
-rw-r--r-- 1 mist wheel 2534 Apr 29 12:22 mist_event_dispatcher.py
-rw-r--r-- 1 mist wheel 14518 Apr 29 12:23 mist_link_event_capturer.py
-rw-r--r-- 1 mist wheel 764 Apr 29 12:23 mist_link_event_logger.py
-rw-r--r-- 1 mist wheel 10530 Apr 29 12:23 mist_monitor_diskspace.py
-rw-r--r-- 1 mist wheel 996 Apr 29 12:23 mist_storm_control_event_logger.py
-rw-r--r-- 1 mist wheel 879 Apr 29 12:23 mist_vcsetup_agent.py
lrwxr-xr-x 1 root wheel 77 Apr 27 02:37 pam_user_lock_deny_host.slax -> /packages/mnt/junos-runtime/var/db/scripts/event/pam_user_lock_deny_host.slax
root@SWITCH:RE:1% cd /var/db/scripts/op/
root@SWITCH:RE:1% chown mist mist_*
If you find a more permanent solution, please let me know. (I have heard that Mist are working on a permanent fix)