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
Add Atomic install class #1311
Add Atomic install class #1311
Conversation
5a5e6f3
to
9cda077
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just an optional suggestion, otherwise looks sane to me.
FedoraBaseInstallClass.__init__(self) | ||
|
||
# This is intended right now to match Fedora Server; if changing this, | ||
# please discuss on https://lists.projectatomic.io/projectatomic-archives/atomic-devel/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Side note...now that this is in the same codebase as Server, maybe we could actually dedup this? Not a blocker/requirement for merging though from my PoV.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've used default partitioning from Fedora Server in the Fedora Atomic install class. Is that what you meant @cgwalters ?
5f912c0
to
85d481b
Compare
UDPATED:
|
ping on this? Atomic installer images for Rawhide are still broken. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have some suggestions.
@@ -37,6 +37,10 @@ class FedoraServerInstallClass(FedoraBaseInstallClass): | |||
hidden = True | |||
|
|||
def setDefaultPartitioning(self, storage): | |||
FedoraServerInstallClass.createDefaultPartitioning(storage) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that you can use self
here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
FedoraBaseInstallClass.__init__(self) | ||
|
||
def setDefaultPartitioning(self, storage): | ||
FedoraServerInstallClass.createDefaultPartitioning(storage) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this install class be based on Fedora Server install class?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again I'm not sure we want to do that. Yeah this one method is the same but what if FedoraServer will change something else in future.
Basically I don't think we want to mix hierarchy in this. If something we can use that mixin but these install classes are not extending one to other by principle.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. I don't like this solution, but we will change install classes anyway.
class AtomicInstallClass(FedoraBaseInstallClass): | ||
name = "Atomic Host" | ||
stylesheet = "/usr/share/anaconda/pixmaps/atomic/fedora-atomic.css" | ||
sortPriority = 11000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Priority should be set to FedoraBaseInstallClass.sortPriority + 1
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
name = "Atomic Host" | ||
stylesheet = "/usr/share/anaconda/pixmaps/atomic/fedora-atomic.css" | ||
sortPriority = 11000 | ||
hidden = False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Atomic install class can be used in Fedora and RHEL? Otherwise, this line should be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
FedoraServerInstallClass.createDefaultPartitioning(storage) | ||
|
||
@staticmethod | ||
def createDefaultPartitioning(storage): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this method could be provided by BaseInstallClass
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it is good idea. This is not the default partitioning. Or anything like that.
If we really want to do something like that then we should create new mixin class for it but I don't know where to put it how to name it and so on and I'm not sure if that would be that beneficial.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok.
Fix the incorrect import. Resolves: rhbz#1536853 Resolves: rhbz#1491287
Fix stylesheet: Stylesheet is used from fedora-logos package where the atomic css file is placed. Add product variant: Product variant is a new way how to recognize Fedora variants to specify special behavior and correctly choose install class. Product variant is specified by Lorax and saved to the .buildstamp file[1]. Hide atomic install class based on this value. Use sort priority from base class: Base class have default sort priority so change the original constant as base value plus one. [1]: https://pagure.io/releng/issue/7202 Related: rhbz#1491287
Remove unused imports. Fix code style.
The partitioning should be the same for both variants.
85d481b
to
2a6fd3a
Compare
UPDATED |
@cgwalters Could you please verified the default partitioning from Fedora Server install class in Fedora Atomic? I know there were different values but it seemed to me like they are not intentional. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Thanks!
Right, I don't think there was a strong rationale for having them different. The new values look fine to me. (Big picture, for bare metal installations we generally expect sysadmins will want to control things. For cloud images we use separate kickstarts which is unrelated to this.) |
jenkins, test this please |
Migrate Atomic install class to Anaconda.
Add
productVariant
check and fix stylesheet in the atomic install class.The Atomic iso (Fedora-Atomic-ostree-x86_64-Rawhide-20180117.n.1.iso) already have
productVariant
in the.buildstamp
file and stylesheet in the fedora logos package so this install class should work without problems -- tested with updates image. The only thing missing is to deprecate the fedora-productimg-atomic package.Resolves: rhbz#1536853
Resolves: rhbz#1491287