Bug 2101435

Summary: Major version fields should not accept negative integer values while creating/updating OS
Product: Red Hat Satellite Reporter: Vladimír Sedmík <vsedmik>
Component: HostsAssignee: satellite6-bugs <satellite6-bugs>
Status: NEW --- QA Contact: Satellite QE Team <sat-qe-bz-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.11.0CC: aruzicka
Target Milestone: UnspecifiedKeywords: EasyFix, Regression, Triaged
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Vladimír Sedmík 2022-06-27 13:51:30 UTC
Description of problem:
In 6.11 it is possible to create or update an OS with a negative number used for major version using API, CLI or UI. It used to be forbidden since BZ#1120199.


Version-Release number of selected component (if applicable):
6.11.0 snap 26


How reproducible:
always


Steps to Reproduce:
1. Create or update an OS using API, CLI or UI and provide a negative number for the major version.


Actual results:
Operating system created (or updated) successfully.
[root@satellite ~]# hammer os info --id 2
Id:                 2
Title:              NegativeOS -99
Release name:       
Family:             
Name:               NegativeOS
Major version:      -99
Minor version:      


Expected results:
It should be banned to create negative OSes like it was in previous Satellite versions.