Unable to Import Gateways - Seems like a Bug

Hi @dmitry.s I tried to import gateways, it spits an error when trying to apply unique columns

Are you aware of this?

We’re sorry, but something went wrong.

Any update on this?

Could you attach log from /var/log/yeti/yeti-web.log ?

@dmitry.s Thank you for your response, I appreciate it

The Logs are here:

   YETI-admin[22795]: [09:42:22.388845 ] [ INFO]: Started PUT "/importing_gateways/apply_unique_columns" for 127.0.0.1 at 2020-10-27 09:42:22 +1100
YETI-admin[22795]: [09:42:22.390634 ] [ INFO]: Processing by ImportingGatewaysController#apply_unique_columns as HTML
YETI-admin[22795]: [09:42:22.390722 ] [ INFO]: Parameters: {"changes"=>{"unique_columns"=>["", "name"]}, "authenticity_token"=>"k8HEuif1RVZ4o9Btto6DFE3QK1r3FBl1XTg79JMOYpUvKsG7osZAxRSwjBeWNenHCXblHsoV61shVkyjBF8z9A=="}
YETI-admin[22795]: [09:42:22.411684 ] [ INFO]: Completed 500 Internal Server Error in 21ms
YETI-admin[22795]: [09:42:22.413820 ] [FATAL]:
YETI-admin[22795]: [09:42:22.413888 ] [FATAL]: ActiveRecord::StatementInvalid (PG::UndefinedColumn: ERROR:  column orig_t.rel_100_mode_id does not exist#012LINE 1: ...FROM import_t.orig_proxy_transport_protocol_id OR orig_t.rel...#012                                                             ^#012HINT:  Perhaps you meant to reference the column "orig_t.rel100_mode_id".#012: UPDATE data_import.import_gateways import_t SET is_changed = (orig_t.name IS DISTINCT FROM import_t.name OR orig_t.enabled IS DISTINCT FROM import_t.enabled OR orig_t.gateway_group_id IS DISTINCT FROM import_t.gateway_group_id OR orig_t.contractor_id IS DISTINCT FROM import_t.contractor_id OR orig_t.is_shared IS DISTINCT FROM import_t.is_shared OR orig_t.priority IS DISTINCT FROM import_t.priority OR orig_t.weight IS DISTINCT FROM import_t.weight OR orig_t.pop_id IS DISTINCT FROM import_t.pop_id OR orig_t.host IS DISTINCT FROM import_t.host OR orig_t.port IS DISTINCT FROM import_t.port OR orig_t.origination_capacity IS DISTINCT FROM import_t.origination_capacity OR orig_t.termination_capacity IS DISTINCT FROM import_t.termination_capacity OR orig_t.diversion_policy_id IS DISTINCT FROM import_t.diversion_policy_id OR orig_t.diversion_rewrite_rule IS DISTINCT FROM import_t.diversion_rewrite_rule OR orig_t.diversion_rewrite_result IS DISTINCT FROM import_t.diversion_rewrite_result OR orig_t.src_name_rewrite_rule IS DISTINCT FROM import_t.src_name_rewrite_rule OR orig_t.src_name_rewrite_result IS DISTINCT FROM import_t.src_name_rewrite_result OR orig_t.src_rewrite_rule IS DISTINCT FROM import_t.src_rewrite_rule OR orig_t.src_rewrite_result IS DISTINCT FROM import_t.src_rewrite_result OR orig_t.dst_rewrite_rule IS DISTINCT FROM import_t.dst_rewrite_rule OR orig_t.dst_rewrite_result IS DISTINCT FROM import_t.dst_rewrite_result OR orig_t.acd_limit IS DISTINCT FROM import_t.acd_limit OR orig_t.asr_limit IS DISTINCT FROM import_t.asr_limit OR orig_t.short_calls_limit IS DISTINCT FROM import_t.short_calls_limit OR orig_t.allow_termination IS DISTINCT FROM import_t.allow_termination OR orig_t.allow_origination IS DISTINCT FROM import_t.allow_origination OR orig_t.anonymize_sdp IS DISTINCT FROM import_t.anonymize_sdp OR orig_t.proxy_media IS DISTINCT FROM import_t.proxy_media OR orig_t.transparent_seqno IS DISTINCT FROM import_t.transparent_seqno OR orig_t.transparent_ssrc IS DISTINCT FROM import_t.transparent_ssrc OR orig_t.auth_enabled IS DISTINCT FROM import_t.auth_enabled OR orig_t.auth_user IS DISTINCT FROM import_t.auth_user OR orig_t.auth_password IS DISTINCT FROM import_t.auth_password OR orig_t.term_use_outbound_proxy IS DISTINCT FROM import_t.term_use_outbound_proxy OR orig_t.term_outbound_proxy IS DISTINCT FROM import_t.term_outbound_proxy OR orig_t.term_force_outbound_proxy IS DISTINCT FROM import_t.term_force_outbound_proxy OR orig_t.term_next_hop IS DISTINCT FROM import_t.term_next_hop OR orig_t.orig_next_hop IS DISTINCT FROM import_t.orig_next_hop OR orig_t.term_append_headers_req IS DISTINCT FROM import_t.term_append_headers_req OR orig_t.orig_append_headers_req IS DISTINCT FROM import_t.orig_append_headers_req OR orig_t.sdp_alines_filter_type_id IS DISTINCT FROM import_t.sdp_alines_filter_type_id OR orig_t.sdp_alines_filter_list IS DISTINCT FROM import_t.sdp_alines_filter_list OR orig_t.term_next_hop_for_replies IS DISTINCT FROM import_t.term_next_hop_for_replies OR orig_t.session_refresh_method_id IS DISTINCT FROM import_t.session_refresh_method_id OR orig_t.sst_enabled IS DISTINCT FROM import_t.sst_enabled OR orig_t.sst_accept501 IS DISTINCT FROM import_t.sst_accept501 OR orig_t.sst_session_expires IS DISTINCT FROM import_t.sst_session_expires OR orig_t.sst_minimum_timer IS DISTINCT FROM import_t.sst_minimum_timer OR orig_t.sst_maximum_timer IS DISTINCT FROM import_t.sst_maximum_timer OR orig_t.orig_disconnect_policy_id IS DISTINCT FROM import_t.orig_disconnect_policy_id OR orig_t.term_disconnect_policy_id IS DISTINCT FROM import_t.term_disconnect_policy_id OR orig_t.sensor_level_id IS DISTINCT FROM import_t.sensor_level_id OR orig_t.sensor_id IS DISTINCT FROM import_t.sensor_id OR orig_t.orig_use_outbound_proxy IS DISTINCT FROM import_t.orig_use_outbound_proxy OR orig_t.orig_force_outbound_proxy IS DISTINCT FROM import_t.orig_force_outbound_proxy OR orig_t.orig_outbound_proxy IS DISTINCT FROM import_t.orig_outbound_proxy OR orig_t.dialog_nat_handling IS DISTINCT FROM import_t.dialog_nat_handling OR orig_t.resolve_ruri IS DISTINCT FROM import_t.resolve_ruri OR orig_t.auth_from_user IS DISTINCT FROM import_t.auth_from_user OR orig_t.auth_from_domain IS DISTINCT FROM import_t.auth_from_domain OR orig_t.ringing_timeout IS DISTINCT FROM import_t.ringing_timeout OR orig_t.relay_options IS DISTINCT FROM import_t.relay_options OR orig_t.relay_reinvite IS DISTINCT FROM import_t.relay_reinvite OR orig_t.relay_hold IS DISTINCT FROM import_t.relay_hold OR orig_t.relay_prack IS DISTINCT FROM import_t.relay_prack OR orig_t.allow_1xx_without_to_tag IS DISTINCT FROM import_t.allow_1xx_without_to_tag OR orig_t.sip_timer_b IS DISTINCT FROM import_t.sip_timer_b OR orig_t.dns_srv_failover_timer IS DISTINCT FROM import_t.dns_srv_failover_timer OR orig_t.sdp_c_location_id IS DISTINCT FROM import_t.sdp_c_location_id OR orig_t.codec_group_id IS DISTINCT FROM import_t.codec_group_id OR orig_t.single_codec_in_200ok IS DISTINCT FROM import_t.single_codec_in_200ok OR orig_t.force_symmetric_rtp IS DISTINCT FROM import_t.force_symmetric_rtp OR orig_t.symmetric_rtp_nonstop IS DISTINCT FROM import_t.symmetric_rtp_nonstop OR orig_t.symmetric_rtp_ignore_rtcp IS DISTINCT FROM import_t.symmetric_rtp_ignore_rtcp OR orig_t.force_dtmf_relay IS DISTINCT FROM import_t.force_dtmf_relay OR orig_t.rtp_ping IS DISTINCT FROM import_t.rtp_ping OR orig_t.rtp_timeout IS DISTINCT FROM import_t.rtp_timeout OR orig_t.filter_noaudio_streams IS DISTINCT FROM import_t.filter_noaudio_streams OR orig_t.rtp_relay_timestamp_aligning IS DISTINCT FROM import_t.rtp_relay_timestamp_aligning OR orig_t.rtp_force_relay_cn IS DISTINCT FROM import_t.rtp_force_relay_cn OR orig_t.dtmf_receive_mode_id IS DISTINCT FROM import_t.dtmf_receive_mode_id OR orig_t.dtmf_send_mode_id IS DISTINCT FROM import_t.dtmf_send_mode_id OR orig_t.tx_inband_dtmf_filtering_mode_id IS DISTINCT FROM import_t.tx_inband_dtmf_filtering_mode_id OR orig_t.rx_inband_dtmf_filtering_mode_id IS DISTINCT FROM import_t.rx_inband_dtmf_filtering_mode_id OR orig_t.transport_protocol_id IS DISTINCT FROM import_t.transport_protocol_id OR orig_t.term_proxy_transport_protocol_id IS DISTINCT FROM import_t.term_proxy_transport_protocol_id OR orig_t.orig_proxy_transport_protocol_id IS DISTINCT FROM import_t.orig_proxy_transport_protocol_id OR orig_t.rel_100_mode_id IS DISTINCT FROM import_t.rel_100_mode_id OR orig_t.incoming_auth_username IS DISTINCT FROM import_t.incoming_auth_username OR orig_t.incoming_auth_password IS DISTINCT FROM import_t.incoming_auth_password OR orig_t.preserve_anonymous_from_domain IS DISTINCT FROM import_t.preserve_anonymous_from_domain OR orig_t.termination_dst_numberlist_id IS DISTINCT FROM import_t.termination_dst_numberlist_id OR orig_t.termination_src_numberlist_id IS DISTINCT FROM import_t.termination_src_numberlist_id OR orig_t.lua_script_id IS DISTINCT FROM import_t.lua_script_id OR orig_t.use_registered_aor IS DISTINCT FROM import_t.use_registered_aor) FROM gateways orig_t WHERE import_t.o_id IS NOT NULL AND import_t.o_id = orig_t.id):
YETI-admin[22795]: [09:42:22.415697 ] [FATAL]:
YETI-admin[22795]: [09:42:22.415753 ] [FATAL]: app/models/importing/base.rb:105:in `apply_is_changed!'#012app/models/importing/base.rb:93:in `resolve_object_id'#012lib/resource_dsl/acts_as_import_preview.rb:71:in `block in acts_as_import_preview'#012config/initializers/instrumentation_notification.rb:32:in `block in process_action'#012config/initializers/instrumentation_notification.rb:31:in `process_action'

Here is the import file header

Name,Enabled,Gateway group name,Priority,Weight,Pop name,Contractor name,Is shared,Allow origination,Allow termination,Sst enabled,Origination capacity,Termination capacity,Preserve anonymous from domain,Termination src numberlist name,Termination dst numberlist name,Acd limit,Asr limit,Short calls limit,Sst session expires,Sst minimum timer,Sst maximum timer,Session refresh method name,Sst accept501,Sensor level name,Sensor name,Orig next hop,Orig append headers req,Orig use outbound proxy,Orig force outbound proxy,Orig proxy transport protocol name,Orig outbound proxy,Dialog nat handling,Orig disconnect policy name,Transport protocol name,Sip schema name,Host,Port,Use registered aor,Network protocol priority name,Resolve ruri,Diversion policy name,Diversion rewrite rule,Diversion rewrite result,Src name rewrite rule,Src name rewrite result,Src rewrite rule,Src rewrite result,Dst rewrite rule,Dst rewrite result,Lua script name,Auth enabled,Auth user,Auth password,Auth from user,Auth from domain,Incoming auth username,Incoming auth password,Term use outbound proxy,Term force outbound proxy,Term proxy transport protocol name,Term outbound proxy,Term next hop for replies,Term next hop,Term disconnect policy name,Term append headers req,Sdp alines filter type name,Sdp alines filter list,Ringing timeout,Relay options,Relay reinvite,Relay hold,Relay prack,Rel100 mode name,Relay update,Allow 1xx without to tag,Sip timer b,Dns srv failover timer,Sdp c location name,Codec group name,Anonymize sdp,Proxy media,Single codec in 200ok,Transparent seqno,Transparent ssrc,Force symmetric rtp,Symmetric rtp nonstop,Symmetric rtp ignore rtcp,Force dtmf relay,Rtp ping,Rtp timeout,Filter noaudio streams,Rtp relay timestamp aligning,Rtp force relay cn,Dtmf send mode name,Dtmf receive mode name,Rx inband dtmf filtering mode,Tx inband dtmf filtering mode,Media encryption mode,Suppress early media,Send lnp information,Force one way early media,Max 30x redirects

It appears some column is missing or something although the column exists as per the logs and I also tried the using equipment import function in https://demo.yeti-switch.org/

What should be the Orig_t.rel_100_mode_id?

I have tried the below and it doesn’t work
Rel100 mode name
Ignored
Ignored
Ignored
Ignored
Ignored

What did you tried? I posted link to bug at github and commit where it was fixed.

@dmitry.s Sorry, I overlooked your previous message, Thanks for fixing it. I will include in fix in our internal CR for the next yeti-web update