Comments (8)
Is this specific to vmhost device or any Junos device?
from ansible-junos-stdlib.
from ansible-junos-stdlib.
Hi @jnicholson56
Thanks ,
I have tested with Dual RE MX device with connection: local
From the logs it looks to be image downloaded to RE0 , RE0 is installed first and then package is pushed to RE1 , RE1 installation happens .
May 6 13:27:57 [NETCONF] - [25609] Incoming: <?xml version="1.0" encoding="UTF-8"?><nc:rpc xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:2c00ec5
5-ce53-405a-ba9d-e484925ae3a2"><request-package-add><no-validate/><package-name>http://10.220.22.5//junos-x86-64-21.4R3-S2.3.tgz</package-name><re0/></request-package-add>
</nc:rpc>]]>]]>
May 6 13:27:57 [NETCONF] - [25609] Outgoing: <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:junos="http://xml.juniper.net/junos/20.3R0/junos" xmlns:nc="
urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:2c00ec55-ce53-405a-ba9d-e484925ae3a2">
May 6 13:27:57 [NETCONF] - [25609] Outgoing: <pipe>
May 6 13:27:57 [NETCONF] - [25609] Outgoing: <more-no-more/>
May 6 13:27:57 [NETCONF] - [25609] Outgoing: </pipe>
May 6 13:27:57 [NETCONF] - [25609] Outgoing: <cli>
May 6 13:27:57 [NETCONF] - [25609] Outgoing: <ignore-signals>
hup
</ignore-signals>
May 6 13:27:57 [NETCONF] - [25609] Outgoing: </cli>
May 6 13:27:57 [NETCONF] - [25609] Outgoing: <output>
May 6 13:28:54 [NETCONF] - [25609] Outgoing: /var/tmp/junos-x86-64-21.4R3-S2.3.tgz.25814 77 MB 77 MBps
May 6 13:28:54 [NETCONF] - [25609] Outgoing: Renaming to junos-x86-64-21.4R3-S2.3.tgz ...
May 6 13:29:08 [NETCONF] - [25609] Outgoing: Verified junos-x86-64-21.4R3-S2.3 signed by PackageProductionECP256_2022 method ECDSA256+SHA256
May 6 13:30:43 [NETCONF] - [25609] Outgoing: Verified deebe signed by PackageProductionECP256_2022 method ECDSA256+SHA256
May 6 13:30:43 [NETCONF] - [25609] Outgoing: Verified dsa signed by PackageProductionECP256_2022 method ECDSA256+SHA256
May 6 13:30:43 [NETCONF] - [25609] Outgoing: Verified dsa-x86-64-21.4R3-S2 signed by PackageProductionECP256_2022 method ECDSA256+SHA25
May 6 13:32:02 [NETCONF] - [25609] Incoming: <?xml version="1.0" encoding="UTF-8"?><nc:rpc xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:071ea19
a-054c-4e98-a6ab-46d2f9effc99"><request-package-add><no-validate/><package-name>http://10.220.22.5//junos-x86-64-21.4R3-S2.3.tgz</package-name><re1/></request-package-add>
</nc:rpc>]]>]]>
May 6 13:32:02 [NETCONF] - [25609] Outgoing: <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:junos="http://xml.juniper.net/junos/20.3R0/junos" xmlns:nc="
urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:071ea19a-054c-4e98-a6ab-46d2f9effc99">
May 6 13:32:02 [NETCONF] - [25609] Outgoing: <pipe>
May 6 13:32:02 [NETCONF] - [25609] Outgoing: <more-no-more/>
May 6 13:32:02 [NETCONF] - [25609] Outgoing: </pipe>
May 6 13:32:02 [NETCONF] - [25609] Outgoing: <cli>
May 6 13:32:02 [NETCONF] - [25609] Outgoing: <ignore-signals>
hup
</ignore-signals>
May 6 13:32:02 [NETCONF] - [25609] Outgoing: </cli>
May 6 13:32:02 [NETCONF] - [25609] Outgoing: <output>
May 6 13:32:02 [NETCONF] - [25609] Outgoing: Fetching package...
May 6 13:32:02 [NETCONF] - [25609] Outgoing: </output>
May 6 13:33:00 [NETCONF] - [25609] Outgoing: <output>
May 6 13:33:00 [NETCONF] - [25609] Outgoing: Pushing /var/tmp/mchassis-install.tgz to re1:/var/tmp/junos-x86-64-21.4R3-S2.3.tgz
May 6 13:33:00 [NETCONF] - [25609] Outgoing: </output>
May 6 13:34:59 [NETCONF] - [25609] Outgoing: <pipe>
May 6 13:34:59 [NETCONF] - [25609] Outgoing: <more-no-more/>
May 6 13:34:59 [NETCONF] - [25609] Outgoing: </pipe>
May 6 13:34:59 [NETCONF] - [25609] Outgoing: <cli>
I have not yet tested the installation on vmhost device, I will check it and update the logs here .
Thanks ,
from ansible-junos-stdlib.
Hi @jnicholson56
Thanks ,
When we set the parameter all_re: True in the playbook
We are sending the following RPC to RE0 of the device, as part of the RPC execution, image gets downloaded to the RE0 and installation continues.
<request-package-add><no-validate/><package-name>http://x,x,x,x//junos-x86-64-21.4R3-S2.3.tgz</package-name><re0/></request-package-add>
After successful completion of the above RPC, another request-package-add RPC for RE1 is executed, as part of the RPC execution, image gets downloaded to the RE0 and pushed to the RE1 for installation,
<request-package-add><no-validate/><package-name>http://x.x.x.x//junos-x86-64-21.4R3-S2.3.tgz</package-name><re1/></request-package-add>
It is as per the implementation of the RPC / command executed on the device, which downloads the package to the local RE from remote URL before installation.
Thanks & Regards
Chidanand
from ansible-junos-stdlib.
Right. that was the behavior I also observed. My ask was can it be changed?
The first test you did is a bit confusing. I think what is happening is that when you tell it to install to RE1, it is downloading the file to RE0 (primary) and then pushing it to RE1. It looks like it is still downloading twice as opposed to once. Each RE has the download from 10.220.22.5 portion which to me says it is downloading from that ftp server.
RE0:
May 6 13:27:57 [NETCONF] - [25609] Incoming: <?xml version="1.0" encoding="UTF-8"?><nc:rpc xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:2c00ec5
5-ce53-405a-ba9d-e484925ae3a2"><request-package-add><no-validate/><package-name>http://10.220.22.5//junos-x86-64-21.4R3-S2.3.tgz</package-name><re0/></request-package-add>
</nc:rpc>]]>]]>
RE1:
May 6 13:32:02 [NETCONF] - [25609] Incoming: <?xml version="1.0" encoding="UTF-8"?><nc:rpc xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:071ea19
a-054c-4e98-a6ab-46d2f9effc99"><request-package-add><no-validate/><package-name>http://10.220.22.5//junos-x86-64-21.4R3-S2.3.tgz</package-name><re1/></request-package-add>
</nc:rpc>]]>]]>
May 6 13:33:00 [NETCONF] - [25609] Outgoing: Pushing /var/tmp/mchassis-install.tgz to re1:/var/tmp/junos-x86-64-21.4R3-S2.3.tgz
I have observed that you can watch /var/home/remote/
on the primary RE and you will see a tmp folder with a random name will be added for each download.
routername-re0> file list detail
/var/home/remote/:
total blocks: 163912
drwx------ 2 remote 20 512 Dec 12 05:45 ...transferring.file.........2o9l6k/
drwx------ 2 remote 20 512 Dec 12 05:45 ...transferring.file.........FtnMHJ/
drwx------ 2 remote 20 512 Dec 12 05:45 ...transferring.file.........P0HGuw/
drwx------ 2 remote 20 512 Dec 12 05:45 ...transferring.file.........qjHyFX/
from ansible-junos-stdlib.
Hi @jnicholson56
Thanks for the information.
I will explore the supported "request system software add /request-package-add" command options and update .
Thanks
Chidanand
from ansible-junos-stdlib.
After going through the documentation of "request system software add" JUNOS CLI command, this is the default behavior of JUNOS CLI/RPC command to download the package to the RE0 and install the package.
JUNOS CLI/RPC command does not provide the option to install the both the REs with single download.
We rely on the underlying JUNOS CLI/RPC commands to perform the ansible tasks and JUNOS CLI command does not provide any such options and this is the limitation of JUNOS CLI/RPC command.
request system software add http://x.x.x.x//junos-x86-64-21.4R3-S2.3.tgz ?
Possible completions:
<[Enter]> Execute this command
best-effort-load Load succeeds if at least one statement is valid
delay-restart Don't restart processes
force Force addition of package (ignore warnings)
no-copy Don't save copies of package files
no-validate Don't check compatibility with current configuration
on-primary Install image on primary partition while booted on secondary partition
re0 Install package on RE0
re1 Install package on RE1
reboot Reboot system after adding package
unlink Remove the package after successful installation
+ upgrade-with-config Additional configs ('text/xml' format) to be applied on upgrade
validate Check compatibility with current configuration
validate-on-host Remote host or user@host for configuration validation
validate-on-routing-engine Routing engine for configuration validation
| Pipe through a command
If we don't specify the RE0/RE1 , then by default it downloads the image to the current RE and install the packages
request system software add http://x.x.x.x//junos-x86-64-21.4R3-S2.3.tgz
when we specify RE0, then it downloads the image to the RE0 and proceeds with installation .
when we specify RE1, then it downloads the image to the RE0 and pushes the image to RE1 and proceeds with installation
we can try ISSU option for Dual RE devices , since it is the same JUNOS CLI/RPC command with option "in-service-upgrade" might download the images again to both the REs .
Please proceed with JUNOS PR for single package download option needs to be supported .
Thanks
Chidanand
from ansible-junos-stdlib.
Thank you for looking into this. I will pursue this with my account team using a PR.
from ansible-junos-stdlib.
Related Issues (20)
- Current implementation doesn't handle multi member stacks where versions of members are inconsistent HOT 8
- Ansible SSH connection fails with Authentication Error if I connected to target via host jump HOT 2
- RPC "get-system-core-dumps" with formats "text" only prints the first line of rpc-reply HOT 4
- juniper.device.config module with set system login message " " with "," separated text message replaces "," with newline HOT 2
- Get facts and printing them results in invalid or malformed argument Error HOT 2
- Executing RPC with filters returns The error was: AttributeError: 'JuniperJunosModule' object has no attribute '_check_type_dict' HOT 3
- Address readthedocs upcoming changes HOT 3
- Ansible RPC error with junipe.device.rpc module HOT 2
- ansible-lint violation: missing required arguments: _inventory_hostname, _module_name, _module_utils_path (warning) HOT 2
- Feature Request: Add option to not discard uncommitted changes HOT 2
- PyEZ connection fails when ~/.ssh/config has a IdentityFile option for target hosts HOT 4
- sphinx-build -b html . _build/html/ fails with AttributeError: 'Sphinx' object has no attribute 'add_stylesheet' with sphinx 7.2.6 HOT 2
- Random diff on juniper SRX device HOT 1
- Update README to clarify the status of collections vs roles HOT 1
- Update tests to cover all modules, when using pyez connection plugin HOT 1
- All modules fail since Ansible 2.15.9 or >=2.16.3 ("missing required arguments") HOT 9
- Juniper's galaxy module download fails. HOT 1
- juniper.device.config always performs a commit confirmed operation HOT 13
- juniper.device.config does not transmit the error message with juniper.device.pyez connection HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ansible-junos-stdlib.