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

RPC command error: commit-configuration is getting thrown on Invoking the "netdev_lag" resource from JUNOS Chef Client #23

Closed
Jainpriyal opened this issue Jul 13, 2015 · 1 comment

Comments

@Jainpriyal
Copy link
Contributor

RECIPE:

[root@bng-chef-ws1 recipes]#cat /root/chef-repo/cookbooks/netdev/recipes/sample_lag.rb
netdev_interface "ge-1/0/0" do
description "Chef Interface created"
duplex "full"
speed "100m"
action :create
end

netdev_interface "ge-1/0/1" do
description "Chef Interface created"
speed "100m"
duplex "full"
action :create
end

netdev_lag 'ae0' do
links %w{ ge-1/0/0 ge-1/0/1 }
lacp 'disable'
action :create
end

EXECUTING THE JUNOS CHEF-CLIENT:

root@csi-irtb2-b% /opt/sdk/chef/bin/ruby /opt/sdk/chef/bin/chef-client -c /config/chef/client.rb
[2015-06-17T23:54:37+05:30] INFO: Forking chef instance to converge...
Starting Chef Client, version 11.10.4
.............................
Compiling Cookbooks...
/var/chef/cache/cookbooks/netdev/libraries/_junos_api_client.rb:35: warning: already initialized constant KNOWN_RESOURCES
/var/chef/cache/cookbooks/netdev/libraries/_junos_api_client.rb:55: warning: already initialized constant L1ports
/var/chef/cache/cookbooks/netdev/libraries/_junos_api_client.rb:55: warning: already initialized constant L2ports
/var/chef/cache/cookbooks/netdev/libraries/_junos_api_client.rb:55: warning: already initialized constant IPports
/var/chef/cache/cookbooks/netdev/libraries/_junos_api_client.rb:55: warning: already initialized constant Vlans
/var/chef/cache/cookbooks/netdev/libraries/_junos_api_client.rb:55: warning: already initialized constant LAGports
/var/chef/cache/cookbooks/netdev/libraries/_junos_api_client.rb:65: warning: already initialized constant VALUES_TO_SYMBOLIZE
Converging 3 resources
Recipe: netdev::sample_lag

  • netdev_interface[ge-1/0/0] action create[2015-06-17T23:54:41+05:30] INFO: Processing netdev_interface[ge-1/0/0] action create (netdev::sample_lag line 1)
    [2015-06-17T23:54:42+05:30] INFO: Netconf session is sucess
    [2015-06-17T23:54:43+05:30] INFO: Netdev::Junos::ApiTransport: Acquired exclusive Junos configuration lock
    • create interface ge-1/0/0 with values: description: Chef Interface created, speed: 100m, duplex: full
  • netdev_interface[ge-1/0/1] action create[2015-06-17T23:54:45+05:30] INFO: Processing netdev_interface[ge-1/0/1] action create (netdev::sample_lag line 8)
    • create interface ge-1/0/1 with values: description: Chef Interface created, speed: 100m, duplex: full
  • netdev_lag[ae0] action create[2015-06-17T23:54:48+05:30] INFO: Processing netdev_lag[ae0] action create (netdev::sample_lag line 15)
    • create link aggregation group ae0 with values: links: ["ge-1/0/0", "ge-1/0/1"]

[2015-06-17T23:54:49+05:30] INFO: Chef Run complete in 9.360989418 seconds

Running handlers:
[2015-06-17T23:54:49+05:30] INFO: Running report handlers
[2015-06-17T23:54:50+05:30] FATAL: Could not complete Junos configuration transaction:

       RPC command error: commit-configuration
    <rpc-reply xmlns:junos="http://xml.juniper.net/junos/15.1D0/junos"  
        xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="19">
      <rpc-error>
           <error-type>application</error-type>
           <error-tag>invalid-value</error-tag>
           <error-severity>error</error-severity>
           <error-path>[edit interfaces ge-1/0/0 ether-options]</error-path>
           <error-message>mgd: This feature can be configured only in Ethernet LAN services
             mode</error-message>
           <error-info>
                <bad-element>802.3ad</bad-element>
           </error-info>
    </rpc-error>
    <rpc-error>
            <error-type>application</error-type>
            <error-tag>invalid-value</error-tag>
            <error-severity>error</error-severity>
            <error-path>[edit interfaces ge-1/0/0 ether-options]</error-path>
            <error-message>mgd: This feature can be configured only in Ethernet LAN services mode
            </error- message>
            <error-info>
                  <bad-element>802.3ad</bad-element>
            </error-info>
    </rpc-error>
    <rpc-error>
            <error-type>application</error-type>
            <error-tag>invalid-value</error-tag>
            <error-severity>error</error-severity>
            <error-path>[edit interfaces ge-1/0/0 ether-options]</error-path>
            <error-message>mgd: This feature can be configured only in Ethernet LAN services mode
            </error-message>
            <error-info>
                  <bad-element>802.3ad</bad-element>
            </error-info>
  </rpc-error>
  <rpc-error>
            <error-type>application</error-type>
            <error-tag>invalid-value</error-tag>
            <error-severity>error</error-severity>
            <error-path>[edit interfaces ge-1/0/0 ether-options]</error-path>
            <error-message>mgd: This feature can be configured only in Ethernet LAN services mode
            </error-message>
            <error-info>
                     <bad-element>802.3ad</bad-element>
            </error-info>
 </rpc-error>
 <rpc-error>
           <error-type>application</error-type>
           <error-tag>invalid-value</error-tag>
           <error-severity>error</error-severity>
           <error-path>[edit interfaces ge-1/0/0 ether-options]</error-path>
           <error-message>mgd: This feature can be configured only in Ethernet LAN services 
            mode</error-message>
           <error-info>
                     <bad-element>802.3ad</bad-element>
           </error-info>
 </rpc-error>
 <rpc-error>
           <error-type>application</error-type>
           <error-tag>invalid-value</error-tag>
           <error-severity>error</error-severity>
           <error-path>[edit interfaces ge-1/0/1 ether-options]</error-path>
           <error-message>mgd: This feature can be configured only in Ethernet LAN services 
             mode</error-message>
           <error-info>
                   <bad-element>802.3ad</bad-element>
           </error-info>
</rpc-error>
<rpc-error>
           <error-type>application</error-type>
           <error-tag>invalid-value</error-tag>
           <error-severity>error</error-severity>
           <error-path>[edit interfaces ge-1/0/1 ether-options]</error-path>
           <error-message>mgd: This feature can be configured only in Ethernet LAN services 
               mode</error-message>
           <error-info>
           <bad-element>802.3ad</bad-element>
           </error-info>
</rpc-error>
<rpc-error>
           <error-type>application</error-type>
           <error-tag>invalid-value</error-tag>
           <error-severity>error</error-severity>
           <error-path>[edit interfaces ge-1/0/1 ether-options]</error-path>
           <error-message>mgd: This feature can be configured only in Ethernet LAN services
              mode</error-message>
           <error-info>
                    <bad-element>802.3ad</bad-element>
           </error-info>
</rpc-error>
<rpc-error>
          <error-type>application</error-type>
          <error-tag>invalid-value</error-tag>
          <error-severity>error</error-severity>
          <error-path>[edit interfaces ge-1/0/1 ether-options]</error-path>
          <error-message>mgd: This feature can be configured only in Ethernet LAN services 
           mode</error-message>
          <error-info>
                  <bad-element>802.3ad</bad-element>
                  </error-info>
 </rpc-error>
 <rpc-error>
            <error-type>application</error-type>
            <error-tag>invalid-value</error-tag>
            <error-severity>error</error-severity>
            <error-path>[edit interfaces ge-1/0/1 ether-options]</error-path>
           <error-message>mgd: This feature can be configured only in Ethernet LAN services 
            mode</error-message>
           <error-info>
                  <bad-element>802.3ad</bad-element>
           </error-info>
 </rpc-error>
 <rpc-error>
         <error-type>protocol</error-type>
         <error-tag>operation-failed</error-tag>
        <error-severity>error</error-severity>
        <error-message>
                commit failed: (statements constraint check failed)
        </error-message>
 </rpc-error>
 </rpc-reply>

Running handlers:
[2015-06-17T23:54:50+05:30] ERROR: Running exception handlers
[2015-06-17T23:54:50+05:30] INFO: Rolled back pending Junos candidate configuration changes

  • JunosCommitTransactionHandler
    Running handlers complete

[2015-06-17T23:54:50+05:30] ERROR: Exception handlers complete
[2015-06-17T23:54:50+05:30] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
Chef Client failed. 3 resources updated in 12.826661867 seconds
[2015-06-17T23:54:50+05:30] ERROR: Could not complete Junos configuration transaction:

      RPC command error: commit-configuration
      <rpc-reply xmlns:junos="http://xml.juniper.net/junos/15.1D0/junos" 
          xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="19">
          <rpc-error>
                 <error-type>application</error-type>
                 <error-tag>invalid-value</error-tag>
                 <error-severity>error</error-severity>
                 <error-path>[edit interfaces ge-1/0/0 ether-options]</error-path>
                 <error-message>mgd: This feature can be configured only in Ethernet LAN services
                          mode</error-message>
                 <error-info>
                         <bad-element>802.3ad</bad-element>
                         </error-info>
      </rpc-error>
      <rpc-error>
                 <error-type>application</error-type>
                 <error-tag>invalid-value</error-tag>
                 <error-severity>error</error-severity>
                 <error-path>[edit interfaces ge-1/0/0 ether-options]</error-path>
                 <error-message>mgd: This feature can be configured only in Ethernet LAN services 
                            mode</error-message>
                 <error-info>
                       <bad-element>802.3ad</bad-element>
                 </error-info>
      </rpc-error>
      <rpc-error>
                 <error-type>application</error-type>
                 <error-tag>invalid-value</error-tag>
                 <error-severity>error</error-severity>
                 <error-path>[edit interfaces ge-1/0/0 ether-options]</error-path>
                 <error-message>mgd: This feature can be configured only in Ethernet LAN services 
                              mode</error-message>
                 <error-info>
                      <bad-element>802.3ad</bad-element>
                 </error-info>
     </rpc-error>
     <rpc-error>
                 <error-type>application</error-type>
                 <error-tag>invalid-value</error-tag>
                 <error-severity>error</error-severity>
                 <error-path>[edit interfaces ge-1/0/0 ether-options]</error-path>
                 <error-message>mgd: This feature can be configured only in Ethernet LAN services
                        mode</error-message>
                 <error-info>
                         <bad-element>802.3ad</bad-element>
                </error-info>
     </rpc-error>
     <rpc-error>
                <error-type>application</error-type>
                <error-tag>invalid-value</error-tag>
                <error-severity>error</error-severity>
                <error-path>[edit interfaces ge-1/0/0 ether-options]</error-path>
                <error-message>mgd: This feature can be configured only in Ethernet LAN services
                                mode</error-message>
                <error-info>
               <bad-element>802.3ad</bad-element>
               </error-info>
     </rpc-error>
     <rpc-error>
                <error-type>application</error-type>
                <error-tag>invalid-value</error-tag>
                <error-severity>error</error-severity>
                <error-path>[edit interfaces ge-1/0/1 ether-options]</error-path>
                <error-message>mgd: This feature can be configured only in Ethernet LAN services 
                        mode</error-message>
                <error-info>
                <bad-element>802.3ad</bad-element>
               </error-info>
     </rpc-error>
     <rpc-error>
                <error-type>application</error-type>
                <error-tag>invalid-value</error-tag>
                <error-severity>error</error-severity>
                <error-path>[edit interfaces ge-1/0/1 ether-options]</error-path>
                <error-message>mgd: This feature can be configured only in Ethernet LAN services 
                  mode</error-message>
                <error-info>
                          <bad-element>802.3ad</bad-element>
                </error-info>
     </rpc-error>
     <rpc-error>
                 <error-type>application</error-type>
                 <error-tag>invalid-value</error-tag>
                 <error-severity>error</error-severity>
                 <error-path>[edit interfaces ge-1/0/1 ether-options]</error-path>
                 <error-message>mgd: This feature can be configured only in Ethernet LAN services 
                       mode</error-message>
                 <error-info>
                         <bad-element>802.3ad</bad-element>
                </error-info>
     </rpc-error>
     <rpc-error>
                 <error-type>application</error-type>
                 <error-tag>invalid-value</error-tag>
                 <error-severity>error</error-severity>
                 <error-path>[edit interfaces ge-1/0/1 ether-options]</error-path>
                 <error-message>mgd: This feature can be configured only in Ethernet LAN services
                        mode</error-message>
                  <error-info>
                 <bad-element>802.3ad</bad-element>
                </error-info>
    </rpc-error>
    <rpc-error>
                 <error-type>application</error-type>
                 <error-tag>invalid-value</error-tag>
                 <error-severity>error</error-severity>
                 <error-path>[edit interfaces ge-1/0/1 ether-options]</error-path>
                 <error-message>mgd: This feature can be configured only in Ethernet LAN services
                        mode</error-message>
                 <error-info>
                        <bad-element>802.3ad</bad-element>
                 </error-info>
    </rpc-error>
   <rpc-error>
             <error-type>protocol</error-type>
             <error-tag>operation-failed</error-tag>
             <error-severity>error</error-severity>
             <error-message>
                      commit failed: (statements constraint check failed)
             </error-message>
    </rpc-error>
   </rpc-reply>

[2015-06-17T23:54:50+05:30] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

ISSUE:

Chef Invocation is trying to add "ether-options" instead of "gigether-options" on MX Devices.Hence the following errors are seen

           <error-path>[edit interfaces ge-1/0/1 ether-options]</error-path>
           <error-message>mgd: This feature can be configured only in Ethernet LAN services 
               mode</error-message>
           <error-info>
           <bad-element>802.3ad</bad-element>
           </error-info>
@Jainpriyal
Copy link
Contributor Author

Fixed in pull request #26

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant