PDA

View Full Version : smt-mirror and reposotory ID



marcinstec
30-Aug-2018, 11:47
Hi,
I'm new to SMT stuff (not even sure if this is a right subforum to post)

Here is my problem: I don't know how to get the right repository ID for command line tools.

I'm trying to mirror on my SMT a reposiroty called SLES12-Pool.
When I run
smt-repos -m I get the following output:


| Yes | 461 | nu | SLES12-Pool | sle-12-x86_64 | SLES12-Pool for sle-12-x86_64 | Yes | No |

Second column is named "ID" which I assume is a repository ID, but when I run
smt-repos -o I get completly different ID for that repo:


| Yes | 3 | nu | SLES12-Pool | sle-12-x86_64 | SLES12-Pool for sle-12-x86_64 | Yes | No |

Finally when I tried to mirror this repo neither 461 or 3 does not work.


smt-mirror --repo <461 or 3 here>

However when I mirrored this repo via
yast2 smt it goes well and process list shows smt-mirror running like:


/usr/bin/perl /usr/sbin/smt-mirror -L /var/log/smt/smt-mirror.log --repository 1634

Where did repository id 1634 came from ?

thsundel
30-Aug-2018, 11:58
Hi,
I'm new to SMT stuff (not even sure if this is a right subforum to post)

Here is my problem: I don't know how to get the right repository ID for command line tools.

I'm trying to mirror on my SMT a reposiroty called SLES12-Pool.
When I run
smt-repos -m I get the following output:


| Yes | 461 | nu | SLES12-Pool | sle-12-x86_64 | SLES12-Pool for sle-12-x86_64 | Yes | No |

Second column is named "ID" which I assume is a repository ID, but when I run
smt-repos -o I get completly different ID for that repo:


| Yes | 3 | nu | SLES12-Pool | sle-12-x86_64 | SLES12-Pool for sle-12-x86_64 | Yes | No |

Finally when I tried to mirror this repo neither 461 or 3 does not work.


smt-mirror --repo <461 or 3 here>

However when I mirrored this repo via
yast2 smt it goes well and process list shows smt-mirror running like:


/usr/bin/perl /usr/sbin/smt-mirror -L /var/log/smt/smt-mirror.log --repository 1634

Where did repository id 1634 came from ?

Did you try this:


NOTE: Detecting Repository IDs

Every repository has a sha1sum that you can use as an ID. You can get the repository's sha1sum by calling smt-repos -v.

https://www.suse.com/documentation/smt11/book_yep/data/smt_mirroring_manage.html

marcinstec
30-Aug-2018, 14:11
You're right!
Works like charm.


[1905] 856: SLES12-Pool sle-12-x86_64
(SLES12-Pool for sle-12-x86_64)
https://updates.suse.com/SUSE/Products/SLE-SERVER/12/x86_64/product/
SUSE/Products/SLE-SERVER/12/x86_64/product/
Repository ID: 1634
Staging : N
Source : S
Assigned to product: SLES 12 x86_64
Assigned to product: SLES_SAP 12 x86_64

Displaing proper repo ID, looks like good candidate for feature request - What is ID column used for in smt-repos -m|o then ?
Or at least documentation should include a piece of information how to get it ;-)

Thanks for your help!

smflood
30-Aug-2018, 14:18
On 30/08/18 11:54, marcinstec wrote:

> I'm new to SMT stuff (not even sure if this is a right subforum to
> post)
>
> Here is my problem: I don't know how to get the right repository ID for
> command line tools.
>
> I'm trying to mirror on my SMT a reposiroty called SLES12-Pool.
> When I run
> Code:
> --------------------
> smt-repos -m
> --------------------
> I get the following output:
>
>
> Code:
> --------------------
> | Yes | 461 | nu | SLES12-Pool | sle-12-x86_64 | SLES12-Pool for sle-12-x86_64 | Yes | No |
> --------------------
>
>
> Second column is named "ID" which I assume is a repository ID, but when
> I run
> Code:
> --------------------
> smt-repos -o
> --------------------
> I get completly different ID for that repo:
>
> Code:
> --------------------
>
> | Yes | 3 | nu | SLES12-Pool | sle-12-x86_64 | SLES12-Pool for sle-12-x86_64 | Yes | No |
> --------------------
>
>
> Finally when I tried to mirror this repo neither 461 or 3 does not
> work.
>
>
> Code:
> --------------------
> smt-mirror --repo <461 or 3 here>
> --------------------
>
>
> However when I mirrored this repo via
> Code:
> --------------------
> yast2 smt
> --------------------
> it goes well and process list shows smt-mirror running like:
>
>
> Code:
> --------------------
> /usr/bin/perl /usr/sbin/smt-mirror -L /var/log/smt/smt-mirror.log --repository 1634
> --------------------
>
>
> Where did repository id 1634 came from ?

Firstly it might help if we knew which version of SLES you are running
SMT on.

The ID column is a local ID relevant to the command you used so
"smt-repos -o" will produce a list of repositories enabled for mirroring
but the IDs won't match the same repositories when listing all
repositories available for mirroring via "smt-repos". Think of ID as a
incremental counter in the output for the command you used.

Note before you can use "smt-mirror" to mirror a repository you first
need to enable it by using "smt-repos -e <repo_name>".

HTH.
--
Simon
SUSE Knowledge Partner

------------------------------------------------------------------------
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below. Thanks.
------------------------------------------------------------------------