It is found that the 'ostree pull' is extremely slow
if the ISO image which provides the remote ostree
repository is served by virtual media. In this case,
the remote location is in the form of a local
directory instead of a URL starting with "http://"
"https://" or "ssh://". To speed this up, we change
to rsync the ostree repository to the true local
file system first, then 'ostree pull' will be used
to create the target repository with the rsynced
repository in the local file system.
The tests shows that the work can be done in about
15 minutes(the size of the ostree repository is about
2.7GB). Without this patch, it takes about 3 hours to
finish the work.
Test Plan:
Pass: 1. On the webUI of the remote management controller,
select 'Virtual Media', set 'Image URL' to the ISO
image URL over http, then click 'Insert Media'
2. Set 'Boot Order' to boot from 'CD/DVD Drive' first
3. Create ipmi session and reboot the device to start
a new installation
4. 'The following rsync command can take a while,
please be patient' will be printed on the console
5. The installation will stopped at 'running:rsync ...'
about 15 minutes
6. Install successfully
Pass: 1. 'dd' the ISO image on USB device
2. Deploy with the USB device successfully
Closes-Bug: 2013345
Signed-off-by: Haiqing Bai <haiqing.bai@windriver.com>
Change-Id: I4f42f9c3eabf1473e2ec1796578abe76c2c98e50